Exemplo n.º 1
0
 /// <remarks/>
 public void GetListItemChangesSinceTokenAsync(string listName, string viewName, GetListItemChangesSinceTokenQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string changeToken, CamlContains contains)
 {
     this.GetListItemChangesSinceTokenAsync(listName, viewName, query, viewFields, rowLimit, queryOptions, changeToken, contains, null);
 }
Exemplo n.º 2
0
 /// <remarks/>
 public void GetListItemChangesSinceTokenAsync(string listName, string viewName, GetListItemChangesSinceTokenQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string changeToken, CamlContains contains, object userState)
 {
     if ((this.GetListItemChangesSinceTokenOperationCompleted == null))
     {
         this.GetListItemChangesSinceTokenOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetListItemChangesSinceTokenOperationCompleted);
     }
     this.InvokeAsync("GetListItemChangesSinceToken", new object[] {
             listName,
             viewName,
             query,
             viewFields,
             rowLimit,
             queryOptions,
             changeToken,
             contains}, this.GetListItemChangesSinceTokenOperationCompleted, userState);
 }
Exemplo n.º 3
0
 public GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult GetListItemChangesSinceToken(string listName, string viewName, GetListItemChangesSinceTokenQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string changeToken, CamlContains contains)
 {
     object[] results = this.Invoke("GetListItemChangesSinceToken", new object[] {
             listName,
             viewName,
             query,
             viewFields,
             rowLimit,
             queryOptions,
             changeToken,
             contains});
     return ((GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult)(results[0]));
 }
Exemplo n.º 4
0
 /// <remarks/>
 public System.IAsyncResult BeginGetListItemChangesSinceToken(string listName, string viewName, GetListItemChangesSinceTokenQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string changeToken, CamlContains contains, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetListItemChangesSinceToken", new object[] {
             listName,
             viewName,
             query,
             viewFields,
             rowLimit,
             queryOptions,
             changeToken,
             contains}, callback, asyncState);
 }
        public void MSLISTSWS_S03_TC37_GetListItemChanges_Success_ListNameIsValidGuid()
        {
            // Create a list.
            string listName = TestSuiteHelper.GetUniqueListName();
            string listId = TestSuiteHelper.CreateList(listName);

            // Add 1 item.
            List<string> updateId = TestSuiteHelper.AddListItems(listId, 1);

            // Read configure value.
            string validFieldName = Common.GetConfigurationPropertyValue("ListFieldText", this.Site);
            string invalidFieldName = TestSuiteHelper.GetUniqueFieldName();

            // Construct view field element.
            CamlViewFields fields = TestSuiteHelper.CreateViewFields(false, new List<string> { validFieldName });

            // Call GetListItemChanges operation to verify the List has been changed on the server.
            GetListItemChangesResponseGetListItemChangesResult result = null;
            result = this.listswsAdapter.GetListItemChanges(
                                                            listId,
                                                            fields,
                                                            null,
                                                            null);

            // As description, the first data element contains all changed rows.
            string columnName = string.Format("{0}{1}", AdapterHelper.PrefixOws, "ID");
            DataTable data = AdapterHelper.ExtractData(result.listitems.data[0].Any);

            // If the count row is the same with the value of create list number, and the value of "ID" is equal to 
            // the return value from AddListItems, then GetListItemChanges will use the specified list.
            bool isUseList = data.Rows.Count == 1 && Convert.ToString(data.Rows[0][columnName]) == updateId[0];

            #region Capture Requirement R629

            Site.Log.Add(
                     LogEntryKind.Debug,
                     "The actual value: data.Rows.Count[{0}],columnName[{1}] for requirement #R629",
                     data.Rows.Count,
                     0 == data.Rows.Count ? "NoRows" : data.Rows[0][columnName]);

            Site.CaptureRequirementIfIsTrue(
                isUseList,
                629,
                @"[In GetListItemChanges operation] If the specified listName is a valid GUID "
                + "and corresponds to the identification of a list on the site, use that list.");

            #endregion

            #region Capture Requirement R634

            // Construct Contains element.
            CamlContains contains = new CamlContains();
            contains.Contains = new CamlContainsContains();
            contains.Contains.FieldRef = new CamlContainsContainsFieldRef();

            // Set the Contains as an invalid field value.
            contains.Contains.FieldRef.Name = validFieldName;
            contains.Contains.Value = new CamlContainsContainsValue();
            contains.Contains.Value.Type = "String";
            contains.Contains.Value.Text = new string[] { invalidFieldName };

            // Call GetListItemChanges operation with the Contains element which filed value is invalid.
            result = null;
            result = this.listswsAdapter.GetListItemChanges(
                                                            listId,
                                                            fields,
                                                            null,
                                                            contains);

            // As description, the first data element contains all changed rows.
            columnName = string.Format("{0}{1}", AdapterHelper.PrefixOws, "ID");
            data = AdapterHelper.ExtractData(result.listitems.data[0].Any);

            Site.Assert.IsNull(data, "If the contains parameter is not match any list item, GetListItemChanges operation should also return without any list items");

            // Construct a Since element not match with any list items.
            string since = System.DateTime.Now.AddYears(100).ToString();

            // Call GetListItemChanges operation with a Since element not match with any list items.
            result = null;
            result = this.listswsAdapter.GetListItemChanges(
                                                            listId,
                                                            fields,
                                                            since,
                                                            null);

            // As description, the first data element contains all changed rows.
            columnName = string.Format("{0}{1}", AdapterHelper.PrefixOws, "ID");
            data = AdapterHelper.ExtractData(result.listitems.data[0].Any);

            Site.Assert.IsNull(data, "If the Since parameter does not match with any list items, GetListItemChanges operation should also return without any list items");

            // If the Since parameter does not match with any list items, then captrue R634
            Site.CaptureRequirement(
               634,
               @"[In GetListItemChanges operation] Otherwise, all list items in the list specified by the listName parameter that match the criteria based on the since and contains parameters MUST be returned,");

            #endregion
        }
Exemplo n.º 6
0
 /// <remarks/>
 public void GetListItemChangesWithKnowledgeAsync(string listName, string viewName, GetListItemChangesWithKnowledgeQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string syncScope, GetListItemChangesWithKnowledgeKnowledge knowledge, CamlContains contains, object userState)
 {
     if ((this.GetListItemChangesWithKnowledgeOperationCompleted == null))
     {
         this.GetListItemChangesWithKnowledgeOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetListItemChangesWithKnowledgeOperationCompleted);
     }
     this.InvokeAsync("GetListItemChangesWithKnowledge", new object[] {
             listName,
             viewName,
             query,
             viewFields,
             rowLimit,
             queryOptions,
             syncScope,
             knowledge,
             contains}, this.GetListItemChangesWithKnowledgeOperationCompleted, userState);
 }
Exemplo n.º 7
0
 public GetListItemChangesWithKnowledgeResponseGetListItemChangesWithKnowledgeResult GetListItemChangesWithKnowledge(string listName, string viewName, GetListItemChangesWithKnowledgeQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string syncScope, GetListItemChangesWithKnowledgeKnowledge knowledge, CamlContains contains)
 {
     object[] results = this.Invoke("GetListItemChangesWithKnowledge", new object[] {
             listName,
             viewName,
             query,
             viewFields,
             rowLimit,
             queryOptions,
             syncScope,
             knowledge,
             contains});
     return ((GetListItemChangesWithKnowledgeResponseGetListItemChangesWithKnowledgeResult)(results[0]));
 }
        /// <summary>
        /// The GetListItemChangesWithKnowledge operation is used to get changes made to a specified list after the event expressed by the knowledge parameter, 
        /// if specified, or to return all the list items in the list.
        /// </summary>
        /// <param name="listName">Get list name</param>
        /// <param name="viewName">The GUID of a view of the list</param>
        /// <param name="query">Query the list</param>
        /// <param name="viewFields">Specifies which fields of the list item should be returned</param>
        /// <param name="rowLimit">The maximum number of rows of data to return</param>
        /// <param name="queryOptions">Specifies various options for modifying the query</param>
        /// <param name="syncScope">This parameter MUST be null or empty</param>
        /// <param name="knowledge">Specifies the knowledge data structure in XML format</param>
        /// <param name="contains">Specifies a value to search for</param>
        /// <returns>The value indicating the error code in the thrown SOAP fault.</returns>
        public GetListItemChangesWithKnowledgeResponseGetListItemChangesWithKnowledgeResult GetListItemChangesWithKnowledge(
            string listName, 
            string viewName,
            GetListItemChangesWithKnowledgeQuery query, 
            CamlViewFields viewFields,
            string rowLimit,
            CamlQueryOptions queryOptions, 
            string syncScope,
            GetListItemChangesWithKnowledgeKnowledge knowledge, 
            CamlContains contains)
        {
            this.Site.Assert.IsNotNull(this.listsProxy, "The Proxy instance should not be NULL. If assert failed, the adapter need to be initialized");

            GetListItemChangesWithKnowledgeResponseGetListItemChangesWithKnowledgeResult result = null;
            try
            {
                result = this.listsProxy.GetListItemChangesWithKnowledge(listName, viewName, query, viewFields, rowLimit, queryOptions, syncScope, knowledge, contains);

                // Verify the requirements of the GetListItemChangesWithKnowledge operation.
                this.VerifyGetListItemChangesWithKnowledgeOperation(result, queryOptions, viewFields);
            }
            catch (XmlSchemaValidationException exp)
            {
                // Log the errors and warnings
                this.LogSchemaValidationErrors();

                this.Site.Assert.Fail(exp.Message);
            }
            catch (SoapException)
            {
                this.VerifySoapExceptionFault();
                throw;
            }

            return result;
        }
Exemplo n.º 9
0
 /// <remarks/>
 public void GetListItemChangesAsync(string listName, CamlViewFields viewFields, string since, CamlContains contains)
 {
     this.GetListItemChangesAsync(listName, viewFields, since, contains, null);
 }
Exemplo n.º 10
0
 /// <remarks/>
 public void GetListItemChangesAsync(string listName, CamlViewFields viewFields, string since, CamlContains contains, object userState)
 {
     if ((this.GetListItemChangesOperationCompleted == null))
     {
         this.GetListItemChangesOperationCompleted = new System.Threading.SendOrPostCallback(this.OnGetListItemChangesOperationCompleted);
     }
     this.InvokeAsync("GetListItemChanges", new object[] {
             listName,
             viewFields,
             since,
             contains}, this.GetListItemChangesOperationCompleted, userState);
 }
Exemplo n.º 11
0
 /// <remarks/>
 public System.IAsyncResult BeginGetListItemChanges(string listName, CamlViewFields viewFields, string since, CamlContains contains, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetListItemChanges", new object[] {
             listName,
             viewFields,
             since,
             contains}, callback, asyncState);
 }
Exemplo n.º 12
0
 public GetListItemChangesResponseGetListItemChangesResult GetListItemChanges(string listName, CamlViewFields viewFields, string since, CamlContains contains)
 {
     object[] results = this.Invoke("GetListItemChanges", new object[] {
             listName,
             viewFields,
             since,
             contains});
     return ((GetListItemChangesResponseGetListItemChangesResult)(results[0]));
 }
        public void MSLISTSWS_S03_TC39_GetListItemChanges_WithContain()
        {
            // Create a list.
            string listId = TestSuiteHelper.CreateList();
            string validFieldName = Common.GetConfigurationPropertyValue("ListFieldText", this.Site);

            // Add 10 items.
            List<string> addItems = TestSuiteHelper.AddListItems(listId, 10);

            // Construct view field element.
            CamlViewFields fields = TestSuiteHelper.CreateViewFields(
                                                    false,
                                                    new List<string> { validFieldName });

            // Construct Contains element.
            CamlContains contains = new CamlContains();
            contains.Contains = new CamlContainsContains();
            contains.Contains.FieldRef = new CamlContainsContainsFieldRef();

            // There MUST be a column called ID.
            contains.Contains.FieldRef.Name = "ID";
            contains.Contains.Value = new CamlContainsContainsValue();
            contains.Contains.Value.Type = "Counter";

            // Use the first added item ID.
            string containsValue = addItems[0];
            contains.Contains.Value.Text = new string[] { containsValue };

            GetListItemChangesResponseGetListItemChangesResult getListItemChangesResult = null;
            getListItemChangesResult = this.listswsAdapter.GetListItemChanges(
                                                    listId,
                                                    fields,
                                                    null,
                                                    contains);

            // According to the Open Specification, the number of data element is 2.
            Site.Debug.AreEqual<int>(
                    2,
                    getListItemChangesResult.listitems.data.Length,
                    "The number data element in the GetListItemChanges should be 2");

            // According to the Open Specification, the first data element contains all the changed rows.
            DataTable data = AdapterHelper.ExtractData(getListItemChangesResult.listitems.data[0].Any);
            string columnNameId = AdapterHelper.PrefixOws + AdapterHelper.FieldIDName;
            bool isContainOnlyOne = data.Rows.Count == 1;
            bool isIdEqual = Convert.ToString(data.Rows[0][columnNameId]) == addItems[0];

            // If only one row is returned and this row ID equals the expected ID, capture R645.
            Site.CaptureRequirementIfIsTrue(
                isContainOnlyOne && isIdEqual,
                645,
                @"[In GetListItemChanges operation] [In GetListItemChanges element] [In contains field] The protocol server MUST return only those list items satisfying this criterion.");
        }
        /// <summary>
        /// The GetListItemChangesSinceToken operation is used to return changes made to a specified list after the event
        /// expressed by the change token, if specified, or to return all the list items in the list.
        /// </summary>
        /// <param name="listName">The name of the list from which version collection will be got</param>
        /// <param name="viewName">The GUID refers to a view of the list</param>
        /// <param name="query">The query to determine which records from the list are to be 
        /// returned and the order in which they will be returned</param>
        /// <param name="viewFields">Specifies which fields of the list item will be returned</param>
        /// <param name="rowLimit">Indicate the maximum number of rows of data to return</param>
        /// <param name="queryOptions">Specifies various options for modifying the query</param>
        /// <param name="changeToken">Assigned a string comprising a token returned by a previous 
        /// call to this operation.</param>
        /// <param name="contains">Specifies a value to search for</param>
        /// <returns>A return value represent the list item changes since the specified token</returns>
        public GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult GetListItemChangesSinceToken(string listName, string viewName, GetListItemChangesSinceTokenQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string changeToken, CamlContains contains)
        {
            if (null == this.listsProxy)
            {
                throw new InvalidOperationException("The Proxy instance is NULL, need to initialize the adapter");
            }

            GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult result = null;
            result = this.listsProxy.GetListItemChangesSinceToken(listName, viewName, query, viewFields, rowLimit, queryOptions, changeToken, contains);
            this.VerifyTransportRequirement();
            this.VerifyGetListItemChangesSinceTokenResponse(result);

            return result;
        }
Exemplo n.º 15
0
 /// <remarks/>
 public System.IAsyncResult BeginGetListItemChangesWithKnowledge(string listName, string viewName, GetListItemChangesWithKnowledgeQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string syncScope, GetListItemChangesWithKnowledgeKnowledge knowledge, CamlContains contains, System.AsyncCallback callback, object asyncState)
 {
     return this.BeginInvoke("GetListItemChangesWithKnowledge", new object[] {
             listName,
             viewName,
             query,
             viewFields,
             rowLimit,
             queryOptions,
             syncScope,
             knowledge,
             contains}, callback, asyncState);
 }
        /// <summary>
        /// The GetListItemChanges operation is used to retrieve the list items that have been inserted or updated
        /// since the specified date and time and matching the specified filter criteria.
        /// </summary>
        /// <param name="listName">The name of the list from which the list item changes will be got</param>
        /// <param name="viewFields">Indicates which fields of the list item SHOULD be returned</param>
        /// <param name="since">The date and time to start retrieving changes in the list
        /// If the parameter is null, protocol server should return all list items
        /// If the date that is passed in is not in UTC format, protocol server will use protocol server's local time zone and convert it to UTC time</param>
        /// <param name="contains">Restricts the results returned by giving a specific value to be searched for in the specified list item field</param>
        /// <returns>Return the list item change result</returns>
        public GetListItemChangesResponseGetListItemChangesResult GetListItemChanges(string listName, CamlViewFields viewFields, string since, CamlContains contains)
        {
            if (null == this.listsProxy)
            {
                throw new InvalidOperationException("The Proxy instance is NULL, need to initialize the adapter");
            }

            GetListItemChangesResponseGetListItemChangesResult result = null;
            result = this.listsProxy.GetListItemChanges(listName, viewFields, since, contains);
            this.VerifyTransportRequirement();

            return result;
        }
Exemplo n.º 17
0
 /// <remarks/>
 public void GetListItemChangesWithKnowledgeAsync(string listName, string viewName, GetListItemChangesWithKnowledgeQuery query, CamlViewFields viewFields, string rowLimit, CamlQueryOptions queryOptions, string syncScope, GetListItemChangesWithKnowledgeKnowledge knowledge, CamlContains contains)
 {
     this.GetListItemChangesWithKnowledgeAsync(listName, viewName, query, viewFields, rowLimit, queryOptions, syncScope, knowledge, contains, null);
 }
        /// <summary>
        /// The GetListItemChanges operation is used to retrieve the list items that have been inserted or updated 
        /// since the specified date and time and matching the specified filter criteria.
        /// </summary>
        /// <param name="listName">The name of the list from which the list item changes will be got</param>
        /// <param name="viewFields">Indicates which fields of the list item SHOULD be returned</param>
        /// <param name="since">The date and time to start retrieving changes in the list
        /// If the parameter is null, Protocol Server should return all list items
        /// If the date that is passed in is not in UTC format, protocol server will use protocol server's local time zone and converted to UTC time</param>
        /// <param name="contains">Restricts the results returned by giving a specific value to be searched for in the specified list item field</param>
        /// <returns>Return the get list item change result</returns>
        public GetListItemChangesResponseGetListItemChangesResult GetListItemChanges(string listName, CamlViewFields viewFields, string since, CamlContains contains)
        {
            this.Site.Assert.IsNotNull(this.listsProxy, "The Proxy instance should not be NULL. If assert failed, the adapter need to be initialized");

            GetListItemChangesResponseGetListItemChangesResult result = null;
            try
            {
                result = this.listsProxy.GetListItemChanges(listName, viewFields, since, contains);

                // Verify the requirements of GetListItemChanges operation.
                this.VerifyGetListItemChangesOperation(result);
            }
            catch (XmlSchemaValidationException exp)
            {
                // Log the errors and warnings
                this.LogSchemaValidationErrors();

                this.Site.Assert.Fail(exp.Message);
            }
            catch (SoapException)
            {
                this.VerifySoapExceptionFault();
                throw;
            }
            
            return result;
        }
        public void MSLISTSWS_S03_TC15_GetListItemChangesSinceToken_ValidListTitle()
        {
            // Read configure value.
            string fieldName = Common.GetConfigurationPropertyValue("ListFieldText", this.Site);
            string columnName = string.Format("{0}{1}", AdapterHelper.PrefixOws, fieldName);

            // Create a list.
            string listName = TestSuiteHelper.GetUniqueListName();
            string listId = TestSuiteHelper.CreateList(listName);

            // Add two items in the created list.
            List<string> ids = TestSuiteHelper.AddListItems(listId, 2);

            // Call getListItemChangesSinceToken using list title and exclude all other parameters.
            GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult getListItemChangesSinceToken = null;
            getListItemChangesSinceToken = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                                    listName,
                                                                                    null,
                                                                                    null,
                                                                                    null,
                                                                                    null,
                                                                                    null,
                                                                                    null,
                                                                                    null);

            // If there is no error and the response list ID equals to the request list ID,
            // capture the MS-LISTSWS_R656, MS-LISTSWS_R657, and MS-LISTSWS_R665 requirements.
            Site.CaptureRequirementIfAreEqual<string>(
                listId,
                getListItemChangesSinceToken.listitems.Changes.List.ID,
                656,
                @"[In GetListItemChangesSinceToken operation] If the specified listName is "
                    + "not a valid GUID, check if the listName corresponds to the List title of a "
                    + "list on the site and if so, use that list.");

            Site.CaptureRequirementIfAreEqual<string>(
                listId,
                getListItemChangesSinceToken.listitems.Changes.List.ID,
                657,
                @"[In GetListItemChangesSinceToken operation] If the specified listName does "
                + "not correspond to the identification of a list on the site, check if the "
                + "listName corresponds to the List title of a list on the site and if so, "
                + "use that list.");

            Site.CaptureRequirementIfAreEqual<string>(
                listId,
                getListItemChangesSinceToken.listitems.Changes.List.ID,
                665,
                @"[GetListItemChangesSinceToken]Otherwise, all list items specified by the "
                    + "listName parameter that match the criteria passed in MUST be returned,"
                    + "[ unless the protocol server encounters an unexpected situation and MUST "
                    + "return a SOAP fault.]");

            // Try to get the list definition using GetList operation.
            ListDefinitionSchema listDef = TestSuiteHelper.GetListDefinition(listId);

            bool isSameListDef = true;

            // If the R7151 is disabled, the SUT equals to Windows SharePoint Services 3.0. The GetListItemChangesSinceToken operation does not return the FileFragment element in the Changes element.
            if (Common.IsRequirementEnabled(7151, this.Site))
            {
                isSameListDef = TestSuiteHelper.DeepCompare(listDef.Fields, getListItemChangesSinceToken.listitems.Changes.List.Fields);
                isSameListDef = isSameListDef && TestSuiteHelper.DeepCompare(listDef.RegionalSettings, getListItemChangesSinceToken.listitems.Changes.List.RegionalSettings);
                isSameListDef = isSameListDef && TestSuiteHelper.DeepCompare(listDef.ServerSettings, getListItemChangesSinceToken.listitems.Changes.List.ServerSettings);
                Site.CaptureRequirementIfIsTrue(
                            isSameListDef,
                            716,
                            "[In GetListItemChangesSinceToken operation]Implementation does return the inner XML of the Changes element which contains the full List element from the GetList operation, if no change token was passed in the request.(Microsoft SharePoint Foundation 2010 and above follow this behavior.)");
            }
            else
            {
                // Remove FileFragment fields from GetList response.
                listDef.Fields.Field = (from field in listDef.Fields.Field
                                        where !"FileFragment".Equals(field.Name, StringComparison.OrdinalIgnoreCase)
                                        select field).ToArray();

                // If both results contain the same Fields, RegionalSettings and ServerSettings,
                // both list elements can be thought as the same; Then, R716 can be captured.
                isSameListDef = TestSuiteHelper.DeepCompare(listDef.Fields, getListItemChangesSinceToken.listitems.Changes.List.Fields);
                isSameListDef = isSameListDef && TestSuiteHelper.DeepCompare(listDef.RegionalSettings, getListItemChangesSinceToken.listitems.Changes.List.RegionalSettings);
                isSameListDef = isSameListDef && TestSuiteHelper.DeepCompare(listDef.ServerSettings, getListItemChangesSinceToken.listitems.Changes.List.ServerSettings);
                Site.CaptureRequirementIfIsTrue(
                            isSameListDef,
                            716,
                            "[In GetListItemChangesSinceToken operation]Implementation does return the inner XML of the Changes element which contains the full List element from the GetList operation, if no change token was passed in the request.(Microsoft SharePoint Foundation 2010 and above follow this behavior.)");
            }

            // Add one list field to make the list schema change.
            TestSuiteHelper.AddFieldsToList(
                                        listId,
                                        new List<string> { TestSuiteHelper.GetUniqueFieldName() },
                                        new List<string> { "Currency" },
                                        new List<string> { null });

            // After the list schema changes to call GetListItemChangesSinceToken using the specified change token,
            // expect returning the new list definition.
            string changeToken = getListItemChangesSinceToken.listitems.Changes.LastChangeToken;
            getListItemChangesSinceToken = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                                    listName,
                                                                                    null,
                                                                                    null,
                                                                                    null,
                                                                                    null,
                                                                                    null,
                                                                                    changeToken,
                                                                                    null);

            // Try to get the list definition using GetList operation again.
            listDef = TestSuiteHelper.GetListDefinition(listId);

            // If the SUT equals WSS3.0 (R7151 is enabled), ignore FileFragment.
            if (Common.IsRequirementEnabled(7151, this.Site))
            {
                isSameListDef = TestSuiteHelper.DeepCompare(listDef.Fields, getListItemChangesSinceToken.listitems.Changes.List.Fields);
                isSameListDef = isSameListDef && TestSuiteHelper.DeepCompare(listDef.RegionalSettings, getListItemChangesSinceToken.listitems.Changes.List.RegionalSettings);
                isSameListDef = isSameListDef && TestSuiteHelper.DeepCompare(listDef.ServerSettings, getListItemChangesSinceToken.listitems.Changes.List.ServerSettings);
                Site.CaptureRequirementIfIsTrue(
                        isSameListDef,
                        717,
                        @"[In GetListItemChangesSinceToken operation]Implementation does return the inner XML of the Changes element which contains the full List element from the GetList operation, if there have been schema changes made to the list after the change token.(Microsoft SharePoint Foundation 2010 and above follow this behavior.)");
            }
            else
            {
                // Remove FileFragment fields from GetList response.
                listDef.Fields.Field = (from field in listDef.Fields.Field
                                        where !"FileFragment".Equals(field.Name, StringComparison.OrdinalIgnoreCase)
                                        select field).ToArray();

                // If both results contain the same Fields, RegionalSettings and ServerSettings,
                // both list elements can be thought as the same; Then R717 can be captured.
                isSameListDef = TestSuiteHelper.DeepCompare(listDef.Fields, getListItemChangesSinceToken.listitems.Changes.List.Fields);
                isSameListDef = isSameListDef && TestSuiteHelper.DeepCompare(listDef.RegionalSettings, getListItemChangesSinceToken.listitems.Changes.List.RegionalSettings);
                isSameListDef = isSameListDef && TestSuiteHelper.DeepCompare(listDef.ServerSettings, getListItemChangesSinceToken.listitems.Changes.List.ServerSettings);
                Site.CaptureRequirementIfIsTrue(
                        isSameListDef,
                        717,
                        @"[In GetListItemChangesSinceToken operation]Implementation does return the inner XML of the Changes element which contains the full List element from the GetList operation, if there have been schema changes made to the list after the change token.(Microsoft SharePoint Foundation 2010 and above follow this behavior.)");
            }

            // Construct view fields and use the specified view fields to invoke GetListItemChangesSinceToken without view name.
            CamlViewFields viewFields = TestSuiteHelper.CreateViewFields(
                                                false,
                                                new List<string> { fieldName });
            GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult resultViewNameNotSpecified = null;
            resultViewNameNotSpecified = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                    listId,
                                                                    null,
                                                                    null,
                                                                    viewFields,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null);

            // Use the specified view fields to invoke GetListItemChangesSinceToken with invalid view name.
            GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult resultViewNameInvalid = null;
            resultViewNameInvalid = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                    listId,
                                                                    Guid.NewGuid().ToString(),
                                                                    null,
                                                                    viewFields,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null);

            // If both the results without view name or with invalid view name are the same,
            // capture R2280.
            bool isSame = TestSuiteHelper.DeepCompare(resultViewNameInvalid, resultViewNameNotSpecified);
            Site.CaptureRequirementIfIsTrue(
                isSame,
                2280,
                @"if the viewFields parameter is specified, the server response "
                 + "will be same when the request uses different  values of viewName parameter.");
            Site.CaptureRequirementIfIsTrue(
                isSame,
                2281,
                 @"If [both viewName and viewFields are] specified, the protocol server response will be same when the request uses different values of viewName parameter.");

            DataTable data = AdapterHelper.ExtractData(resultViewNameInvalid.listitems.data.Any);
            Site.Assert.AreEqual<int>(
                            2,
                            data.Rows.Count,
                            "There are must have two rows in the current list state.");

            // Get the first row value as the query condition.
            GetListItemChangesSinceTokenQuery query = new GetListItemChangesSinceTokenQuery();
            query.Query = TestSuiteHelper.CreateQueryRoot(fieldName, Convert.ToString(data.Rows[0][columnName]));

            // Call GetListItemChangesSinceToken with query.
            GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult resultContainNotSpecified = null;
            resultContainNotSpecified = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                    listId,
                                                                    null,
                                                                    query,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null);

            // Construct Contains element.
            CamlContains contains = new CamlContains();
            contains.Contains = new CamlContainsContains();
            contains.Contains.FieldRef = new CamlContainsContainsFieldRef();

            // Must contains a field called ID.
            contains.Contains.FieldRef.Name = "ID";
            contains.Contains.Value = new CamlContainsContainsValue();
            contains.Contains.Value.Type = "Counter";

            // Use the second added item ID.
            string containsValue = ids[1];
            contains.Contains.Value.Text = new string[] { containsValue };

            // Call GetListItemChangesSinceToken with contains.
            GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult resultContainSpecified = null;
            resultContainSpecified = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                    listId,
                                                                    null,
                                                                    query,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    contains);

            // If both of the result are same, capture R2285.
            isSame = TestSuiteHelper.DeepCompare(resultContainNotSpecified, resultContainSpecified);
            Site.CaptureRequirementIfIsTrue(
                isSame,
                2285,
                @"if query parameter is specified, the server response will be same for different values of contains parameter.");

            // Call GetListItemChangesSinceToken without QueryOptions.
            GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult resultExcludeOptions = null;
            resultExcludeOptions = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                    listId,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null);

            // Call GetListItemChangesSinceToken with CamlQueryOptions using the default value
            // specified by the document.
            CamlQueryOptions options = CreateDefaultCamlQueryOptions();
            GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult resultIncludeDefaultOptions = null;
            resultIncludeDefaultOptions = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                    listId,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    options,
                                                                    null,
                                                                    null);

            // If both results are same, capture R679.
            isSame = TestSuiteHelper.DeepCompare(resultExcludeOptions, resultIncludeDefaultOptions);
            Site.CaptureRequirementIfIsTrue(
                isSame,
                679,
                 @"[In GetListItemChangesSinceToken operation] [In GetListItemChangesSinceToken element] [In queryOptions"
                     + "field] If the queryOptions parameter is excluded, the default values that the protocol server MUST use "
                     + "are the following: RecurrenceOrderBy – True, ViewAttributes – Scope=\"RecursiveAll\", DateInUtc –True,"
                     + "IncludePermissions – True, IncludeAttachmentUrls – True, IncludeAttachmentVersion – True, "
                     + "RecurrencePatternXMLVersion – v3, ExpandUserField – True, MeetingInstanceID – -1.");

            // Make Query option's RecurrenceOrderBy and RecurrencePatternXMLVersion different from the default value.
            options.QueryOptions.RecurrenceOrderBy = "False";
            options.QueryOptions.RecurrencePatternXMLVersion = EnumRecurrencePatternXMLVersion.Item;

            // Call GetListItemChangesSinceToken with the specified QueryOptions.
            GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult resultIncludeSpecifiedOptions = null;
            resultIncludeSpecifiedOptions = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                    listId,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    null,
                                                                    options,
                                                                    null,
                                                                    null);

            // If both of the result are the same, capture R689.
            isSame = TestSuiteHelper.DeepCompare(resultExcludeOptions, resultIncludeSpecifiedOptions);
            Site.CaptureRequirementIfIsTrue(
                isSame,
                689,
                @"[In GetListItemChangesSinceToken operation] [In GetListItemChangesSinceToken element]"
                    + "[In queryOptions field] The default values for RecurrenceOrderBy and RecurrencePatternXMLVersion"
                    + "MUST NOT affect the response if RecurrenceData field is not part of the list item.");

            // If the viewFields parameter is not specified and the viewName parameter contains a valid GUID but refers to a view that does not exist, capture R660            
            try
            {
                this.listswsAdapter.GetListItemChangesSinceToken(
                                                        listId,
                                                        Guid.NewGuid().ToString(),
                                                        null,
                                                        null,
                                                        null,
                                                        null,
                                                        null,
                                                        null);

                Site.Assert.Fail("GetListItemChangesSinceToken operation must return a SOAP fault If the viewFields parameter is not specified and the viewName parameter contains a valid GUID but refers to a view that does not exist");
            }
            catch (SoapException)
            {
                // If a SOAP exception is caught, it means a SOAP fault is returned. So capture R660.
                Site.CaptureRequirement(
                    660,
                    @"If the viewFields parameter is not specified and the viewName parameter contains a valid GUID but refers to a view that does not exist, the protocol server MUST return a SOAP fault. ");
            }

            // If both of the result are the same, capture R6611
            if (Common.IsRequirementEnabled(6611, this.Site))
            {
                GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult resultInvaildViewNameFirst = null;
                string viewNameFirst = TestSuiteHelper.GetInvalidGuidAndNocorrespondString();

                resultInvaildViewNameFirst = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                        listId,
                                                                        viewNameFirst,
                                                                        null,
                                                                        null,
                                                                        null,
                                                                        null,
                                                                        null,
                                                                        null);

                GetListItemChangesSinceTokenResponseGetListItemChangesSinceTokenResult resultInvaildViewNameSecond = null;
                string viewNameSecond = string.Empty;

                do
                {
                    viewNameSecond = TestSuiteHelper.GetInvalidGuidAndNocorrespondString();
                }
                while (viewNameFirst == viewNameSecond);

                resultInvaildViewNameSecond = this.listswsAdapter.GetListItemChangesSinceToken(
                                                                        listId,
                                                                        viewNameSecond,
                                                                        null,
                                                                        null,
                                                                        null,
                                                                        null,
                                                                        null,
                                                                        null);

                // If both of the result are same, capture R6611.
                isSame = TestSuiteHelper.DeepCompare(resultInvaildViewNameFirst, resultInvaildViewNameSecond);
                Site.CaptureRequirementIfIsTrue(
                    isSame,
                    6611,
                    @"[In GetListItemChangesSinceToken operation] When the viewFields parameter is not specified,  the server returns same for two different  viewName parameters which contains an invalid GUID."
                        + "(SharePoint Foundation 2010 and above follow this behavior.) ");
            }

            // If the result is a SOAP fault without error code and contains the expected error string, capture R6612
            if (Common.IsRequirementEnabled(6612, this.Site))
            {
                string viewName = TestSuiteHelper.GetInvalidGuidAndNocorrespondString();
                string expectedErrorString = "GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx).";

                try
                {
                    this.listswsAdapter.GetListItemChangesSinceToken(
                                                            listId,
                                                            viewName,
                                                            null,
                                                            null,
                                                            null,
                                                            null,
                                                            null,
                                                            null);

                    Site.Assert.Fail("GetListItemChangesSinceToken operation must return a SOAP fault if the viewFields parameter is not specified and the viewName parameter contains an invalid GUID.");
                }
                catch (SoapException ex)
                {
                    string errorCode = TestSuiteHelper.GetErrorCode(ex);
                    string errorString = TestSuiteHelper.GetErrorString(ex);

                    // If the result is a SOAP fault without error code and contains the expected error string, capture R6612
                    Site.Log.Add(
                        LogEntryKind.Debug,
                        "The actual value: errorCode[{0}] for requirement #R6612",
                        string.IsNullOrEmpty(errorCode) ? "NullOrEmpty" : errorCode);

                    Site.Log.Add(
                        LogEntryKind.Debug,
                        "The actual value: errorString[{0}] for requirement #R6612",
                        string.IsNullOrEmpty(errorString) ? "NullOrEmpty" : errorString);

                    bool isR6612Verified = errorCode == null && expectedErrorString.Equals(errorString, StringComparison.OrdinalIgnoreCase);

                    Site.CaptureRequirementIfIsTrue(
                        isR6612Verified,
                        6612,
                        @"[In GetListItemChangesSinceToken operation] Implementation does return the following SOAP fault with no error code: ""GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx)"", "
                        + @"if the viewFields parameter is not specified and the viewName parameter contains an invalid GUID.  (<58> Section 3.1.4.22:  Windows SharePoint Services 3.0 returns the following SOAP fault with no error code: ""GUID should contain 32 digits with 4 dashes (xxxxxxxx-xxxx-xxxx-xxxx-xxxx-xxxxxxxxxxx)"") ");
                }
            }
        }