public void MSFSSHTTP_FSSHTTPB_S01_TC01_DownloadContents_EmptyUrl()
{
if ((!Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3008, this.Site))
&& (!Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3009, this.Site)))
{
Site.Assume.Inconclusive("Implementation does not have same behaviors as Microsoft products.");
}
// Initialize the context using user01 and defaultFileUrl.
this.InitializeContext(this.DefaultFileUrl, this.UserName01, this.Password01, this.Domain);
CellStorageResponse response = new CellStorageResponse();
bool isR3008Verified = false;
try
{
// Query the updated file content.
CellSubRequestType queryChange = SharedTestSuiteHelper.CreateCellSubRequestEmbeddedQueryChanges(SequenceNumberGenerator.GetCurrentFSSHTTPBSubRequestID());
response = Adapter.CellStorageRequest(string.Empty, new SubRequestType[] { queryChange });
}
catch (System.Xml.XmlException exception)
{
string message = exception.Message;
isR3008Verified = message.Contains("Duplicate attribute");
isR3008Verified &= message.Contains("ErrorCode");
}
if (SharedContext.Current.IsMsFsshttpRequirementsCaptured)
{
// Verify MS-FSSHTTP requirement: MS-FSSHTTP_R3008
if (Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3008, this.Site))
{
Site.Log.Add(
LogEntryKind.Debug,
"SharePoint server 2010 and SharePoint Foundation responses two ErrorCode attributes when the URL is empty.");
Site.CaptureRequirementIfIsTrue(
isR3008Verified,
"MS-FSSHTTP",
3008,
@"[In Appendix B: Product Behavior] If the Url attribute of the corresponding Request element is an empty string, the implementation does return two ErrorCode attributes in Response element. <3> Section 2.2.3.5: SharePoint Server 2010 will return 2 ErrorCode attributes in Response element.");
}
// Verify MS-FSSHTTP requirement: MS-FSSHTTP_R3009
if (Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3009, this.Site))
{
Site.CaptureRequirementIfIsNull(
response.ResponseCollection,
"MS-FSSHTTP",
3009,
@"[In Appendix B: Product Behavior] If the Url attribute of the corresponding Request element is an empty string, the implementation does not return Response element. <3> Section 2.2.3.5: SharePoint Server 2013 will not return Response element.");
}
}
else
{
if (Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3008, this.Site))
{
Site.Log.Add(
LogEntryKind.Debug,
"SharePoint server 2010 and SharePoint Foundation responses two ErrorCode attributes when the URL is non exists.");
Site.Assert.IsTrue(
isR3008Verified,
"SharePoint server 2010 and SharePoint Foundation responses two ErrorCode attributes when the URL is non exists.");
}
if (Common.IsRequirementEnabled("MS-FSSHTTP-FSSHTTPB", 3009, this.Site))
{
Site.Assert.IsNull(
response.ResponseCollection,
@"[In Appendix B: Product Behavior] If the Url attribute of the corresponding Request element is an empty string, the implementation does not return Response element. <3> Section 2.2.3.5: SharePoint Server 2013 will not return Response element.");
}
}
}