public void MSSITESS_S01_TC06_ExportingFailureOverwriteFailure()
{
Site.Assume.IsTrue(Common.IsRequirementEnabled(5311, this.Site), @"Test is executed only when R5311Enabled is set to true.");
#region Variables
string exportUrl = Common.GetConfigurationPropertyValue(Constants.NormalSubsiteUrl, this.Site);
string dataPath = Common.GetConfigurationPropertyValue(Constants.DataPath, this.Site);
string exportJobName = Constants.ExportJobName + Common.FormatCurrentDateTime();
int cabSize = 50;
string[] exportWebFiles = null;
int exportWebResult = 0;
#endregion Variables
// Initialize the web service with an authenticated account.
this.sitessAdapter.InitializeWebService(UserAuthenticationOption.Authenticated);
// Invoke the ExportWeb operation with valid dataPath, 1 is expected to be returned.
exportWebResult = this.sitessAdapter.ExportWeb(exportJobName, exportUrl, dataPath, true, true, true, cabSize);
#region Capture requirements
// If 1 is returned, requirements related with ExportWeb pending can be verified.
this.VerifyExportWebInProgress(exportWebResult);
#endregion Capture requirements
string files = TestSuiteHelper.VerifyExportAndImportFile(exportJobName, 2, this.Site, this.sutAdapter);
exportWebFiles = files == null ? null : files.TrimEnd(new char[] { ';' }).Split(';');
// Invoke the ExportWeb operation with overwrite set to false and exportJobName set to an existing job name, 5 is expected to be returned.
exportWebResult = this.sitessAdapter.ExportWeb(exportJobName, exportUrl, dataPath, true, true, false, cabSize);
#region Capture requirements
Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R82");
// Verify MS-SITESS requirement: MS-SITESS_R82
Site.CaptureRequirementIfAreEqual<int>(
5,
exportWebResult,
82,
@"[In ExportWeb] [overWrite:] The server MUST NOT overwrite existing file(s) with the new file(s) if false is specified.");
Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R392");
// Verify MS-SITESS requirement: MS-SITESS_R392
Site.CaptureRequirementIfAreEqual<int>(
5,
exportWebResult,
392,
@"[In ExportWeb] [overWrite:] If the server cannot create a new file due to this parameter set to FALSE, it MUST return error code 5 as defined in 3.1.4.2.2.2");
// Verify that Microsoft Windows SharePoint Services 3.0 and above support operation ExportWeb.
this.VerifyOperationExportWeb();
#endregion Capture requirements
}