public void MSLISTSWS_S03_TC40_GetListItemChanges_Fail_EmptyListName()
{
Site.Assume.IsTrue(
Common.IsRequirementEnabled(5882, this.Site) || Common.IsRequirementEnabled(30183, this.Site),
@"Test is executed only when R5882Enabled is set to true or R30183Enabled is set to true.");
// Construct a ListName does not correspond to a list.
string listName = 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.GetListItemChanges(listName, 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 'GetListItemChanges' that the listName is an empty string .");
// If a SOAP fault is returned with no error code, capture R30182.
if (Common.IsRequirementEnabled(5882, this.Site))
{
bool isR5882Verified = isSoapRaultReturned && string.IsNullOrEmpty(errorCode);
Site.CaptureRequirementIfIsTrue(
isR5882Verified,
5882,
@"[In Appendix B: Product Behavior] [In GetListItemChanges operation] Implementation does return a SOAP fault with no error code, if the specified listName is an empty string. ( <54> Section 3.1.4.21: 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 R30183.
if (Common.IsRequirementEnabled(30183, this.Site))
{
bool isR30183Verified = isSoapRaultReturned && errorCode == "0x82000006";
Site.CaptureRequirementIfIsTrue(
isR30183Verified,
30183,
@"[In GetListItemChanges operation] Implementation does return a SOAP fault with error code 0x82000006, if the specified listName is an empty string.(SharePoint Foundation 2013 and above follow this behavior.)");
}
}