public void MSLISTSWS_S03_TC42_GetListItems_EmptyListNameAndViewName()
{
Site.Assume.IsTrue(
Common.IsRequirementEnabled(5894, this.Site) || Common.IsRequirementEnabled(30193, this.Site),
@"Test is executed only when R5894Enabled is set to true or R30193Enabled is set to true.");
// Construct a ListName does not correspond to a list.
string listName = string.Empty;
string viewName = string.Empty;
string errorCode = string.Empty;
bool isSoapRaultReturned = false;
try
{
// Call GetListItemChanges operation to verify the List has been changed on the server.
this.listswsAdapter.GetListItems(listName, viewName, null, null, null, null, null);
}
catch (SoapException soapException)
{
isSoapRaultReturned = true;
errorCode = TestSuiteHelper.GetErrorCode(soapException);
}
Site.Assert.IsTrue(isSoapRaultReturned, "A SOAP exception should be thrown by the server when invoke the operation 'GetListItems' when both listName and viewName are empty string.");
// If a SOAP fault is returned with no error code, capture R30192.
if (Common.IsRequirementEnabled(5894, this.Site))
{
bool isR5894Verified = isSoapRaultReturned && string.IsNullOrEmpty(errorCode);
Site.CaptureRequirementIfIsTrue(
isR5894Verified,
5894,
@"[In Appendix B: Product Behavior][In GetListItems operation] Implementation does return a SOAP fault with no error code, if listName and viewName are both empty. (<66> Section 3.1.4.24: In Windows SharePoint Services 3.0 and SharePoint Foundation 2010, this error code is not returned in the SOAP fault.)");
}
// If error code "0x82000006" is returned, capture R30193.
if (Common.IsRequirementEnabled(30193, this.Site))
{
bool isR30193Verified = isSoapRaultReturned && errorCode == "0x82000006";
Site.CaptureRequirementIfIsTrue(
isR30193Verified,
30193,
@"[In GetListItems operation] Implementation does return a SOAP fault with error code 0x82000006, if listName and viewName are both empty.(SharePoint Foundation 2013 and above follow this behavior.)");
}
}