public void MSVIEWSS_S04_TC02_UpdateViewHtml_InvalidListName()
{
// Call AddView method to add a list view for the specified list on the server.
string viewName = this.AddView(false, Query.AvailableQueryInfo, ViewType.Html);
UpdateViewHtmlViewProperties viewProperties = new UpdateViewHtmlViewProperties();
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();
aggregations.Aggregations = 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();
bool caughtSoapException = false;
// Call UpdateViewHtml method with invalid listName.
try
{
Adapter.UpdateViewHtml(
this.GenerateRandomString(10),
viewName,
viewProperties,
toolbar,
viewHeader,
viewBody,
viewFooter,
viewEmpty,
rowLimitExceeded,
queryValue,
updateViewFields,
aggregations,
formats,
rowLimitValue);
}
catch (SoapException soapException)
{
caughtSoapException = true;
// If the server returns SOAP fault, then capture this requirement.
Site.CaptureRequirementIfIsNotNull(
soapException,
13,
"[In listName] If the value of listName element is not the name or GUID of a list, the operation MUST return a SOAP fault message.");
}
this.Site.Assert.IsTrue(caughtSoapException, "There should be a SOAP exception in the response.");
}