public void MSVIEWSS_S04_TC10_UpdateViewHtml_AllParameters()
{
// Call AddView method to add a list view for the specified list on the server.
string listName = TestSuiteBase.ListGUID;
string viewName = this.AddView(false, Query.AvailableQueryInfo, ViewType.Html);
// Call UpdateViewHtml method to update the FPModified.
UpdateViewHtmlViewProperties viewProperties = new UpdateViewHtmlViewProperties();
viewProperties.View = new UpdateViewPropertiesDefinition();
viewProperties.View.FPModified = "true";
UpdateViewHtmlToolbar toolbar;
UpdateViewHtmlViewHeader viewHeader;
UpdateViewHtmlViewBody viewBody;
UpdateViewHtmlViewFooter viewFooter;
UpdateViewHtmlViewEmpty viewEmpty;
UpdateViewHtmlRowLimitExceeded rowLimitExceeded;
this.GetHtmlConfigure(
out toolbar,
out viewHeader,
out viewBody,
out viewFooter,
out viewEmpty,
out rowLimitExceeded);
UpdateViewHtmlQuery queryValue = new UpdateViewHtmlQuery();
queryValue.Query = this.GetCamlQueryRootForWhere(false);
UpdateViewHtmlViewFields updateViewFields = new UpdateViewHtmlViewFields();
updateViewFields.ViewFields = this.GetViewFields(false);
UpdateViewHtmlAggregations aggregations = new UpdateViewHtmlAggregations();
this.GetAggregationsDefinition(true, true, Common.GetConfigurationPropertyValue("FieldRefAggregations_AggregationsType", this.Site));
UpdateViewHtmlFormats formats = new UpdateViewHtmlFormats();
formats.Formats = this.GetViewFormatDefinitions();
UpdateViewHtmlRowLimit rowLimitValue = new UpdateViewHtmlRowLimit();
rowLimitValue.RowLimit = this.GetAvailableRowLimitDefinition();
UpdateViewHtmlResponseUpdateViewHtmlResult updateViewHtmlResult = Adapter.UpdateViewHtml(
listName,
viewName,
viewProperties,
toolbar,
viewHeader,
viewBody,
viewFooter,
viewEmpty,
rowLimitExceeded,
queryValue,
updateViewFields,
aggregations,
formats,
rowLimitValue);
this.Site.Assert.IsNotNull(updateViewHtmlResult, "The updated view html should be got successfully.");
this.Site.Assert.IsNotNull(updateViewHtmlResult.View, "The server should return a View element that specifies the list view when the UpdateViewHtml method succeeds!");
// Call GetViewHtml method to get the list view updated above.
GetViewHtmlResponseGetViewHtmlResult getViewHtml = Adapter.GetViewHtml(listName, viewName);
this.Site.Assert.IsNotNull(getViewHtml, "The updated view html should be got successfully.");
this.Site.Assert.IsNotNull(getViewHtml.View, "The response element \"getViewHtml.View\" should not be null.");
this.Site.Assert.IsNotNull(getViewHtml.View.FPModified, "The response element \"getViewHtml.View.FPModified\" should not be null.");
this.Site.Assert.AreEqual("true", getViewHtml.View.FPModified.ToLower(), "The updated FPModified should be got successfully!");
// The protocol server successfully updates the default list view and return a View element that specifies the list view, so capture this requirement.
Site.CaptureRequirement(
127,
@"[In UpdateViewHtmlResponse] UpdateViewHtmlResult: If the protocol server successfully updates the list view, it MUST return a View element that specifies the list view.");
}