private void VerifyGetListItemChangesSinceTokenOperation(
GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult getListItemChangesSinceTokenResult,
CamlQueryOptions queryOptions,
CamlViewFields viewFields)
{
// Ensure the SOAP result is de-serialized successfully.
Site.Assume.IsNotNull(getListItemChangesSinceTokenResult, "The result of GetListItemChangesSinceToken operation must not be null.");
// Verify R1876
// The response have been received successfully, then the following requirement can be captured.
// If the response is not received and parsed successfully, the test case will fail before this requirement is captured
Site.CaptureRequirement(
1876,
@"[The schema of GetListItemChangesSinceToken is defined as:]"
+ @"<wsdl:operation name=""GetListItemChangesSinceToken"">"
+ @" <wsdl:input message=""GetListItemChangesSinceTokenSoapIn"" />"
+ @" <wsdl:output message=""GetListItemChangesSinceTokenSoapOut"" />"
+ @"</wsdl:operation>");
// Verify R654
// The response have been received successfully, then the following requirement can be captured.
// If the response is not received and parsed successfully, the test case will fail before this requirement is captured
Site.CaptureRequirement(
654,
@"[In GetListItemChangesSinceToken operation] [If the protocol client sends a "
+ "GetListItemChangesSinceTokenSoapIn request message] the protocol server "
+ "responds with a GetListItemChangesSinceTokenSoapOut response message.");
// Verify R1882
// The response have been received successfully, then the following requirement can be captured.
// If the response is not received and parsed successfully, the test case will fail before this requirement is captured
Site.CaptureRequirement(
1882,
@"[GetListItemChangesSinceTokenSoapOut]The SOAP Body contains a "
+ "GetListItemChangesSinceTokenResponse element.");
// Verify R1897
// The response have been received successfully, then the following requirement can be captured.
// If the response is not received and parsed successfully, the test case will fail before this requirement is captured
Site.CaptureRequirement(
1897,
@"[The schema of GetListItemChangesSinceTokenResponse is defined as:] <s:element name=""GetListItemChangesSinceTokenResponse"">
<s:complexType>
<s:sequence>
<s:element minOccurs=""0"" maxOccurs=""1"" name=""GetListItemChangesSinceTokenResult"">
<s:complexType mixed=""true"">
<s:sequence>
<s:element name=""listitems"" >
<s:complexType>
<s:sequence>
<s:element name=""Changes"" >
<s:complexType>
<s:sequence>
<s:element name=""List"" type=""tns:ListDefinitionSchema""
minOccurs=""0"" />
<s:element name=""Id"" type=""tns:ListItemChangeDefinition"" minOccurs=""0""/>
</s:sequence>
<s:attribute name=""LastChangeToken"" type=""s:string"" />
<s:attribute name=""MoreChanges"" type=""core:TRUEFALSE"" />
<s:attribute name=""MinTimeBetweenSyncs"" type=""s:unsignedInt"" />
<s:attribute name=""RecommendedTimeBetweenSyncs"" type=""s:unsignedInt"" />
<s:attribute name=""MaxBulkDocumentSyncSize"" type=""s:unsignedInt"" />
<s:attribute name=""MaxRecommendedEmbeddedFileSize"" type=""s:unsignedInt"" />
<s:attribute name=""AlternateUrls"" type=""s:string"" />
<s:attribute name=""EffectivePermMask"" type=""s:string"" />
</s:complexType>
</s:element>
<s:any />
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>
</s:sequence>
</s:complexType>
</s:element>");
// Verify R1898
// The response have been received successfully, then the following requirement can be captured.
// If the response is not received and parsed successfully, the test case will fail before this requirement is captured
Site.CaptureRequirement(
1898,
@"[GetListItemChangesSinceTokenResponse]GetListItemChangesSinceTokenResult: The top-level element, which contains a listitems element.");
// Verify R1908
// In MS-LISTSWS.wsdl. The 'any' element has been replaced by rs:data.
// The response have been received successfully, then the following requirement can be captured.
// If the response is not received and parsed successfully, the test case will fail before this requirement is captured
Site.CaptureRequirement(
1908,
@"[GetListItemChangesSinceTokenResponse]The listitems element also contains an inner element named rs:data, which is of type DataDefinition ListItemCollectionPositionNext (section 2.2.4.7).");
// Verify R2486
if (Common.IsRequirementEnabled(2486, this.Site))
{
if (getListItemChangesSinceTokenResult.listitems.Changes.List != null)
{
bool isFileFragmentExist = getListItemChangesSinceTokenResult.listitems.Changes.List.Fields.Field.Any(field => field.Name == "FileFragment");
Site.CaptureRequirementIfIsFalse(
isFileFragmentExist,
2486,
@"[In GetListItemChangesSinceToken operation]Implementation does not return the FileFragment element.[In Appendix B: Product Behavior] <61> Section 3.1.4.22.2.2: In Windows SharePoint Services 3.0, the FileFragment element is not returned.");
}
}
// Verify the requirements of the DataDefinition complex type.
if (getListItemChangesSinceTokenResult.listitems.data != null)
{
this.VerifyDataDefinition(getListItemChangesSinceTokenResult.listitems.data);
}
// Verify the requirements of the ListDefinitionSchema complex type.
if (getListItemChangesSinceTokenResult.listitems.Changes.List != null)
{
this.VerifyListDefinitionSchema(getListItemChangesSinceTokenResult.listitems.Changes.List);
}
// Verify the requirements of the ListItemChangeDefinition complex type.
if (null != getListItemChangesSinceTokenResult.listitems && null != getListItemChangesSinceTokenResult.listitems.Changes
&& null != getListItemChangesSinceTokenResult.listitems.Changes && null != getListItemChangesSinceTokenResult.listitems.Changes.Id)
{
this.VerifyListItemChangeDefinition(getListItemChangesSinceTokenResult.listitems.Changes.Id);
this.VerifyServerChangeUnitAttributeNotReturn(getListItemChangesSinceTokenResult.listitems.Changes.Id);
}
// Verify the requirements of the EnumViewAttributes simple type.
if (queryOptions != null)
{
if (getListItemChangesSinceTokenResult.listitems.data.Any != null)
{
DataTable data = AdapterHelper.ExtractData(getListItemChangesSinceTokenResult.listitems.data.Any);
string author = data.Columns.Contains("ows_Author") ? Convert.ToString(data.Rows[0]["ows_Author"]) : null;
this.VerifyCamlQueryOptions(queryOptions, viewFields, author);
}
if (queryOptions.QueryOptions != null)
{
if (queryOptions.QueryOptions.ViewAttributes != null)
{
if (queryOptions.QueryOptions.ViewAttributes.ScopeSpecified)
{
this.VerifyEnumViewAttributes();
}
}
}
}
// Verify R1907
// The response have been received successfully, then the following requirement can be captured.
// If the response is not received and parsed successfully, the test case will fail before this requirement is captured
Site.CaptureRequirement(
1907,
@"[GetListItemChangesSinceTokenResponse]Note that set of fields returned by the method is restricted by the viewField or viewName parameter.");
}