Esempio n. 1
0
        public void MSVIEWSS_S05_TC06_UpdateViewHtml2_Success_LeastInputParameters()
        {
            this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true.");

            // Add a default view.
            this.AddView(true, Query.EmptyQueryInfo, ViewType.Grid);

            // Call UpdateViewHtml2 to get the default view with display properties by giving only one input parameter, the list name.
            UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Re = Adapter.UpdateViewHtml2(
                TestSuiteBase.ListGUID,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null,
                null);

            this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully.");
            this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation.");

            // Verify Requirement MS-VIEWSS_R145, if the server returns a View element in the update result.
            Site.CaptureRequirementIfIsNotNull(updateViewHtml2Re.View, 145, @"[In UpdateViewHtml2Response] UpdateViewHtml2Result: If the protocol server successfully updates the list view, it MUST return a View element that specifies the list view.");

            // Verify Requirement MS-VIEWSS_R8016, if the server returns a View element in the update result that indicates the UpdateViewHTML2 operation succeed on the server.
            Site.CaptureRequirementIfIsNotNull(updateViewHtml2Re.View, 8016, @"[In Appendix B: Product Behavior] Implementation does support this method[UpdateViewHtml2]. (Windows SharePoint Services 3.0 and above products follow this behavior.)");
            this.Site.Assert.IsNotNull(updateViewHtml2Re.View.DefaultView, "The response element \"updateViewHtml2Re.View.DefaultView\" should not be null.");
            bool isDefaultView = Convert.ToBoolean(updateViewHtml2Re.View.DefaultView);

            // Verify Requirement MS-VIEWSS_R2301, if the server returns the default view back.
            Site.CaptureRequirementIfIsTrue(isDefaultView, 2301, @"[In viewName] When viewName element is not present in the message, the protocol server MUST refer to the default list view of the list (1).");
        }
Esempio n. 2
0
        public void MSVIEWSS_S05_TC05_UpdateViewHtml2_EmptyViewName()
        {
            this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true.");

            string listName = TestSuiteBase.ListGUID;

            // Add a default view.
            this.AddView(true, Query.EmptyQueryInfo, ViewType.Grid);

            string updatedDisplayName = this.GenerateRandomString(6);
            UpdateViewHtml2ViewProperties   viewProperties = this.GetViewProperties(false, updatedDisplayName, false, ViewScope.Recursive);
            UpdateViewHtml2Toolbar          toolbar;
            UpdateViewHtml2ViewHeader       viewHeader;
            UpdateViewHtml2ViewBody         viewBody;
            UpdateViewHtml2ViewFooter       viewFooter;
            UpdateViewHtml2ViewEmpty        viewEmpty;
            UpdateViewHtml2RowLimitExceeded rowLimitExceeded;

            this.GetHtmlConfigure(
                out toolbar,
                out viewHeader,
                out viewBody,
                out viewFooter,
                out viewEmpty,
                out rowLimitExceeded);

            UpdateViewHtml2Query queryValue = new UpdateViewHtml2Query();

            queryValue.Query = this.GetCamlQueryRoot(Query.IsNotCollapse, false);

            UpdateViewHtml2ViewFields viewFields = new UpdateViewHtml2ViewFields();

            viewFields.ViewFields = this.GetViewFields(false);

            UpdateViewHtml2Aggregations aggregations = new UpdateViewHtml2Aggregations();
            string aggregationsType = Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site);

            aggregations.Aggregations = this.GetAggregationsDefinition(true, true, aggregationsType);

            UpdateViewHtml2Formats formats = new UpdateViewHtml2Formats();

            formats.Formats = this.GetViewFormatDefinitions();

            UpdateViewHtml2RowLimit rowLimitValue = new UpdateViewHtml2RowLimit();

            rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition();

            string openApplicationExtension = Common.GetConfigurationPropertyValue("OpenApplicationExtension", this.Site);

            // Call UpdateViewHtml2 operation with empty view name.
            UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Re = Adapter.UpdateViewHtml2(
                listName,
                string.Empty,
                viewProperties,
                toolbar,
                viewHeader,
                viewBody,
                viewFooter,
                viewEmpty,
                rowLimitExceeded,
                queryValue,
                viewFields,
                aggregations,
                formats,
                rowLimitValue,
                openApplicationExtension);

            this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully.");
            this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation.");
            this.Site.Assert.IsNotNull(updateViewHtml2Re.View.DefaultView, "The response element \"updateViewHtml2Re.View.DefaultView\" should not be null.");
            bool isDefaultView = Convert.ToBoolean(updateViewHtml2Re.View.DefaultView);

            // Verify Requirement MS-VIEWSS_R2302, if the server returns the default view back.
            Site.CaptureRequirementIfIsTrue(isDefaultView, 2302, @"[In viewName] When the value of viewName element is empty, the protocol server MUST refer to the default list view of the list (1).");
        }
Esempio n. 3
0
        public void MSVIEWSS_S05_TC01_UpdateViewHtml2_Success()
        {
            this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true.");

            // Add a view.
            string viewName = this.AddView(false, Query.EmptyQueryInfo, ViewType.Html);

            string updatedDisplayName = this.GenerateRandomString(6);
            UpdateViewHtml2ViewProperties   viewProperties = this.GetViewProperties(false, updatedDisplayName, false, ViewScope.Recursive);
            UpdateViewHtml2Toolbar          toolbar;
            UpdateViewHtml2ViewHeader       viewHeader;
            UpdateViewHtml2ViewBody         viewBody;
            UpdateViewHtml2ViewFooter       viewFooter;
            UpdateViewHtml2ViewEmpty        viewEmpty;
            UpdateViewHtml2RowLimitExceeded rowLimitExceeded;

            this.GetHtmlConfigure(
                out toolbar,
                out viewHeader,
                out viewBody,
                out viewFooter,
                out viewEmpty,
                out rowLimitExceeded);

            UpdateViewHtml2Query queryValue = new UpdateViewHtml2Query();

            queryValue.Query = this.GetCamlQueryRoot(Query.AvailableQueryInfo, false);

            UpdateViewHtml2ViewFields viewFields = new UpdateViewHtml2ViewFields();

            viewFields.ViewFields = this.GetViewFields(false);

            UpdateViewHtml2Aggregations aggregations = new UpdateViewHtml2Aggregations();
            string aggregationsType = Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site);

            aggregations.Aggregations = this.GetAggregationsDefinition(true, true, aggregationsType);

            UpdateViewHtml2Formats formats = new UpdateViewHtml2Formats();

            formats.Formats = this.GetViewFormatDefinitions();

            UpdateViewHtml2RowLimit rowLimitValue = new UpdateViewHtml2RowLimit();

            rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition();

            string openApplicationExtension = Common.GetConfigurationPropertyValue("OpenApplicationExtension", this.Site);

            // Call UpdateViewHtml2 to update the view including display properties and the possibility to be rendered with extended application.
            // All optional parameters in the request of UpdateViewHtml2 are present in this call.
            UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Re = Adapter.UpdateViewHtml2(
                TestSuiteBase.ListGUID,
                viewName,
                viewProperties,
                toolbar,
                viewHeader,
                viewBody,
                viewFooter,
                viewEmpty,
                rowLimitExceeded,
                queryValue,
                viewFields,
                aggregations,
                formats,
                rowLimitValue,
                openApplicationExtension);

            this.Site.Assert.IsNotNull(updateViewHtml2Re, "There should be a result element returned from the UpdateViewHtml2 operation.");

            // Verify Requirement MS-VIEWSS_R145, if the server returns a View element in the update result.
            Site.CaptureRequirementIfIsNotNull(updateViewHtml2Re.View, 145, @"[In UpdateViewHtml2Response] UpdateViewHtml2Result: If the protocol server successfully updates the list view, it MUST return a View element that specifies the list view.");
            this.Site.Assert.IsNotNull(updateViewHtml2Re.View.DisplayName, "The response element \"updateViewHtml2Re.View.DisplayName\" should not be null.");
            this.Site.Assert.AreEqual(viewProperties.View.DisplayName, updateViewHtml2Re.View.DisplayName, "The display name should be the same as updated.");

            // Verify Requirement MS-VIEWSS_R8016, if the server returns a View element in the update result that indicates the UpdateViewHTML2 operation succeed on the server.
            Site.CaptureRequirementIfIsNotNull(updateViewHtml2Re.View, 8016, @"[In Appendix B: Product Behavior] Implementation does support this method[UpdateViewHtml2]. (Windows SharePoint Services 3.0 and above products follow this behavior.)");
        }
Esempio n. 4
0
        public void MSVIEWSS_S05_TC03_UpdateViewHtml2_GroupByAndCollapse()
        {
            this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true.");

            this.Site.Assume.IsTrue(Common.IsRequirementEnabled(1507, this.Site), @"The test case is executed only when R1507Enabled is set to true.");

            // Add a view.
            string viewName = this.AddView(false, Query.EmptyQueryInfo, ViewType.Grid);

            string updatedDisplayName = this.GenerateRandomString(6);
            UpdateViewHtml2ViewProperties   viewProperties = this.GetViewProperties(false, updatedDisplayName, false, ViewScope.RecursiveAll);
            UpdateViewHtml2Toolbar          toolbar;
            UpdateViewHtml2ViewHeader       viewHeader;
            UpdateViewHtml2ViewBody         viewBody;
            UpdateViewHtml2ViewFooter       viewFooter;
            UpdateViewHtml2ViewEmpty        viewEmpty;
            UpdateViewHtml2RowLimitExceeded rowLimitExceeded;

            this.GetHtmlConfigure(
                out toolbar,
                out viewHeader,
                out viewBody,
                out viewFooter,
                out viewEmpty,
                out rowLimitExceeded);

            UpdateViewHtml2Query queryValue = new UpdateViewHtml2Query();

            // Make the query have GroupBy condition and Collapse as false.
            queryValue.Query = this.GetCamlQueryRoot(Query.IsNotCollapse, false);

            UpdateViewHtml2ViewFields viewFields = new UpdateViewHtml2ViewFields();

            viewFields.ViewFields = this.GetViewFields(false);

            UpdateViewHtml2Aggregations aggregations = new UpdateViewHtml2Aggregations();
            string aggregationsType = Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site);

            aggregations.Aggregations = this.GetAggregationsDefinition(true, true, aggregationsType);

            UpdateViewHtml2Formats formats = new UpdateViewHtml2Formats();

            formats.Formats = this.GetViewFormatDefinitions();

            UpdateViewHtml2RowLimit rowLimitValue = new UpdateViewHtml2RowLimit();

            rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition();

            string openApplicationExtension = Common.GetConfigurationPropertyValue("OpenApplicationExtension", this.Site);

            // Call UpdateViewHtml2 to update the view with a query having GroupBy condition and Collapse as false.
            UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Re = Adapter.UpdateViewHtml2(
                TestSuiteBase.ListGUID,
                viewName,
                viewProperties,
                toolbar,
                viewHeader,
                viewBody,
                viewFooter,
                viewEmpty,
                rowLimitExceeded,
                queryValue,
                viewFields,
                aggregations,
                formats,
                rowLimitValue,
                openApplicationExtension);

            this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully.");
            this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation.");

            // Get the count of the items in the view.
            int itemGroupByCount = TestSuiteBase.SutControlAdapter.GetItemsCount(TestSuiteBase.ListGUID, viewName);

            int expectAllItemsCount = int.Parse(Common.GetConfigurationPropertyValue("AllItemsCount", this.Site));

            // Verify Requirement MS-WSSCAML_R67, if the item count in the view returned from the server is the same with the count of all list items.
            Site.CaptureRequirementIfAreEqual(expectAllItemsCount, itemGroupByCount, "MS-WSSCAML", 67, @"[In Attributes] Otherwise[In GroupByDefinition: If Collapse is false], the number of rows in the result set MUST NOT be affected by the GroupBy element.");

            // Make the query have GroupBy condition and Collapse as true, while the referenced view fields have no computed fields.
            queryValue.Query = this.GetCamlQueryRoot(Query.IsCollapse, false);

            // Call UpdateViewHtml2 to update the view with a query having GroupBy condition and Collapse as true, while the referenced view fields have no computed fields.
            updateViewHtml2Re = Adapter.UpdateViewHtml2(
                TestSuiteBase.ListGUID,
                viewName,
                viewProperties,
                toolbar,
                viewHeader,
                viewBody,
                viewFooter,
                viewEmpty,
                rowLimitExceeded,
                queryValue,
                viewFields,
                aggregations,
                formats,
                rowLimitValue,
                openApplicationExtension);
            this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully.");
            this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation.");

            int itemCollapseCount       = TestSuiteBase.SutControlAdapter.GetItemsCount(TestSuiteBase.ListGUID, viewName);
            int expectItemCollapseCount = int.Parse(Common.GetConfigurationPropertyValue("AllItemsCount", this.Site));

            // Verify Requirement MS-VIEWSS_R1507, if the item count in the view returned from the server is the same with the count of all items in the list.
            Site.CaptureRequirementIfAreEqual <int>(expectItemCollapseCount, itemCollapseCount, 1507, @"[In Appendix B: Product Behavior] Implementation does not restrict the number of rows present in the result set to the number of unique tuples where a tuple is a set of field values when there aren't any computed fields in the ViewFields section if Collapse is true.(Windows SharePoint Services 2.0 and above products follow this behavior.)");
        }
Esempio n. 5
0
        public void MSVIEWSS_S05_TC02_UpdateViewHtml2_LogicalJoin()
        {
            this.Site.Assume.IsTrue(Common.IsRequirementEnabled(8016, this.Site), @"The test case is executed only when R8016Enabled is set to true.");

            // Add a view.
            string viewName = this.AddView(false, Query.EmptyQueryInfo, ViewType.Html);

            string updatedDisplayName = this.GenerateRandomString(6);
            UpdateViewHtml2ViewProperties   viewProperties = this.GetViewProperties(false, updatedDisplayName, false, ViewScope.Item);
            UpdateViewHtml2Toolbar          toolbar;
            UpdateViewHtml2ViewHeader       viewHeader;
            UpdateViewHtml2ViewBody         viewBody;
            UpdateViewHtml2ViewFooter       viewFooter;
            UpdateViewHtml2ViewEmpty        viewEmpty;
            UpdateViewHtml2RowLimitExceeded rowLimitExceeded;

            this.GetHtmlConfigure(
                out toolbar,
                out viewHeader,
                out viewBody,
                out viewFooter,
                out viewEmpty,
                out rowLimitExceeded);

            UpdateViewHtml2Query queryValue = new UpdateViewHtml2Query();

            // Make the query having LogicalJoinDefinition element with available child in it.
            queryValue.Query = this.GetCamlQueryRoot(Query.AvailableQueryInfo, false);

            UpdateViewHtml2ViewFields viewFields = new UpdateViewHtml2ViewFields();

            viewFields.ViewFields = this.GetViewFields(false);

            UpdateViewHtml2Aggregations aggregations = new UpdateViewHtml2Aggregations();
            string aggregationsType = Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site);

            aggregations.Aggregations = this.GetAggregationsDefinition(true, true, aggregationsType);

            UpdateViewHtml2Formats formats = new UpdateViewHtml2Formats();

            formats.Formats = this.GetViewFormatDefinitions();

            UpdateViewHtml2RowLimit rowLimitValue = new UpdateViewHtml2RowLimit();

            rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition();

            string openApplicationExtension = Common.GetConfigurationPropertyValue("OpenApplicationExtension", this.Site);

            // Call UpdateViewHtml2 to update the view with available LogicalJoinDefinition query condition.
            UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Re = Adapter.UpdateViewHtml2(
                TestSuiteBase.ListGUID,
                viewName,
                viewProperties,
                toolbar,
                viewHeader,
                viewBody,
                viewFooter,
                viewEmpty,
                rowLimitExceeded,
                queryValue,
                viewFields,
                aggregations,
                formats,
                rowLimitValue,
                openApplicationExtension);

            this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully.");
            this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation.");

            // Get the count of the items in the view.
            int itemCountInTheView = TestSuiteBase.SutControlAdapter.GetItemsCount(TestSuiteBase.ListGUID, viewName);

            int expectIQueryItemsCount = int.Parse(Common.GetConfigurationPropertyValue("QueryItemsCount", this.Site));

            // Verify Requirement MS-WSSCAML_R25, if the item count in the view returned from the server is the same with the query expectation.
            Site.CaptureRequirementIfAreEqual(expectIQueryItemsCount, itemCountInTheView, "MS-WSSCAML", 25, @"[In LogicalJoinDefinition Type] When this element[LogicalJoinDefinition] is present and has child elements, the server MUST return only list items that satisfy the conditions specified by those child elements.");

            // Make the query having no child element in LogicalJoinDefinition, an empty query.
            queryValue.Query = this.GetCamlQueryRoot(Query.EmptyQueryInfo, false);

            // Call UpdateViewHtml2 to update the view with an empty query condition.
            updateViewHtml2Re = Adapter.UpdateViewHtml2(
                TestSuiteBase.ListGUID,
                viewName,
                viewProperties,
                toolbar,
                viewHeader,
                viewBody,
                viewFooter,
                viewEmpty,
                rowLimitExceeded,
                queryValue,
                viewFields,
                aggregations,
                formats,
                rowLimitValue,
                openApplicationExtension);
            this.Site.Assert.IsNotNull(updateViewHtml2Re, "The updated view html2 should be got successfully.");
            this.Site.Assert.IsNotNull(updateViewHtml2Re.View, "There should be a view element returned from a successful UpdateViewHtml2 operation.");

            // Get the count of the items in the view.
            itemCountInTheView = TestSuiteBase.SutControlAdapter.GetItemsCount(TestSuiteBase.ListGUID, viewName);
            int expectAllItemsCount = int.Parse(Common.GetConfigurationPropertyValue("AllItemsCount", this.Site));

            // Verify Requirement MS-WSSCAML_R2501, if the item count in the view returned from the server is the same with the count of all list items.
            Site.CaptureRequirementIfAreEqual(expectAllItemsCount, itemCountInTheView, "MS-WSSCAML", 2501, @"[In LogicalJoinDefinition Type] When there are no child elements[in the element of LogicalJoinDefinition type], no additional conditions apply to the query.");
        }
        /// <summary>
        /// Used to validate the UpdateViewHtml2 result.
        /// </summary>
        /// <param name="updateViewHtml2Result">Specify the result of the updateViewHtml2 operation.</param>
        private void ValidateUpdateViewHtml2Result(UpdateViewHtml2ResponseUpdateViewHtml2Result updateViewHtml2Result)
        {
            // Since the UpdateViewHtml2 operation succeeds without SOAP exception, the requirement R8013 can be captured directly.
            Site.CaptureRequirement(
                8013,
                @"[In UpdateViewHtml2] The definition of the UpdateViewHtml2 operation is as follows.
                                        <wsdl:operation name=""UpdateViewHtml2"">
                                            <wsdl:input message=""tns:UpdateViewHtml2SoapIn"" />
                                            <wsdl:output message=""tns:UpdateViewHtml2SoapOut"" />
                                        </wsdl:operation>");

            // Since the operation succeeds without SOAP exception, then the requirement R130 can be captured.
            Site.CaptureRequirementIfIsTrue(
                this.PassSchemaValidation,
                130,
                "[In UpdateViewHtml2] The protocol client sends an UpdateViewHtml2SoapIn request message (section 3.1.4.8.1.1), and the protocol server responds with an UpdateViewHtml2SoapOut response message (section 3.1.4.8.1.2).");

            // The UpdateViewHtml2Response minOccurs="1", the schema validation succeeds then requirement R344 can captured.
            Site.CaptureRequirementIfIsTrue(
                this.PassSchemaValidation,
                344,
                @"[In UpdateViewHtml2SoapOut] The SOAP body contains an UpdateViewHtml2Response element (section 3.1.4.8.2.8).");

            // If the schema validation succeeds then requirement R184 can be captured.
            Site.CaptureRequirementIfIsTrue(
                this.PassSchemaValidation,
                184,
                @"[In UpdateViewHtml2Response] The definition of the UpdateViewHtml2Response element is as follows.
                            <s:element name=""UpdateViewHtml2Response"">
                              <s:complexType>
                                <s:sequence>
                                  <s:element name=""UpdateViewHtml2Result"" minOccurs=""1"" maxOccurs=""1"">
                                    <s:complexType>
                                      <s:sequence>
                                        <s:element name=""View"" type=""core:ViewDefinition"" minOccurs=""1"" maxOccurs=""1""/>
                                      </s:sequence>
                                    </s:complexType>
                                  </s:element>
                                </s:sequence>
                              </s:complexType>
                            </s:element>");

            // Validate the view definition related requirements.
            this.ValidateViewDefinition(updateViewHtml2Result.View);
        }