public void MSVIEWSS_S01_TC05_AddView_EmptyRowLimitWithoutWhere()
{
// Call AddView method to add a list view with an empty rowLimit and a query without Where condition.
string listName = TestSuiteBase.ListGUID;
string displayName = this.GenerateRandomString(5);
AddViewViewFields viewFields = new AddViewViewFields();
viewFields.ViewFields = this.GetViewFields(true);
AddViewQuery addViewQuery = new AddViewQuery();
addViewQuery.Query = this.GetCamlQueryRootForGroupBy(true);
AddViewRowLimit rowLimit = new AddViewRowLimit();
string type = ViewType.Grid.ToString();
AddViewResponseAddViewResult addViewResponseAddViewResult = Adapter.AddView(listName, displayName, viewFields, addViewQuery, rowLimit, type, false);
this.Site.Assert.IsNotNull(addViewResponseAddViewResult, "The added view should be got successfully.");
this.Site.Assert.IsNotNull(addViewResponseAddViewResult.View, "The server should return a View element that specifies the list view when the AddView method is successful!");
// Put the newly added view into ViewPool.
string viewName = addViewResponseAddViewResult.View.Name;
TestSuiteBase.ViewPool.Add(viewName);
// Call GetView method to get the list view created above.
GetViewResponseGetViewResult getView = Adapter.GetView(listName, viewName);
this.Site.Assert.IsNotNull(getView, "The created list view should be got successfully.");
this.Site.Assert.IsNotNull(getView.View, "The response element \"getView.View\" should not be null.");
this.Site.Assert.IsNotNull(getView.View.DisplayName, "The response element \"getView.View.DisplayName\" should not be null.");
this.Site.Assert.AreEqual(displayName, getView.View.DisplayName, "The list view added in the step above should be got successfully!");
this.Site.Assert.IsNotNull(addViewResponseAddViewResult.View.RowLimit, "There should be the RowLimit element in the view.");
// Call GetItemsCount method to get the count of the list items in the specified view.
int queryActualItemCount = TestSuiteBase.SutControlAdapter.GetItemsCount(listName, viewName);
int expectItemCount = int.Parse(Common.GetConfigurationPropertyValue("AllItemsCount", this.Site));
// If the rowLimit is not provided and there is a query condition, the number of view's items should be equal to the number of query items, then the following requirement can be captured.
Site.CaptureRequirementIfAreEqual(
expectItemCount,
queryActualItemCount,
"MS-WSSCAML",
787,
@"[In Child Elements] If [the content of RowLimitDefinition is ]not specified, the list schema consumer MUST return all items that meet the filter condition.");
}