Microsoft.Protocols.TestSuites.MS_SITESS.S01_MigrateSite.MSSITESS_S01_TC05_ExportingFailureExportFileNoAccess C# (CSharp) Méthode

MSSITESS_S01_TC05_ExportingFailureExportFileNoAccess() private méthode

private MSSITESS_S01_TC05_ExportingFailureExportFileNoAccess ( ) : void
Résultat void
        public void MSSITESS_S01_TC05_ExportingFailureExportFileNoAccess()
        {
            Site.Assume.IsTrue(Common.IsRequirementEnabled(5311, this.Site), @"Test is executed only when R5311Enabled is set to true.");

            #region Variables
            string siteUrl = Common.GetConfigurationPropertyValue(Constants.SiteUrl, this.Site);
            string exportUrl = Common.GetConfigurationPropertyValue(Constants.NormalSubsiteUrl, this.Site);
            string libraryName = Common.GetConfigurationPropertyValue(Constants.InvalidLibraryName, this.Site);
            string dataPath = siteUrl + "/" + libraryName;
            int cabSize = 50;
            int exportWebResult = 0;

            #endregion Variables

            // Initialize the web service with an authenticated account.
            this.sitessAdapter.InitializeWebService(UserAuthenticationOption.Authenticated);

            // Invoke the ExportWeb operation with invalid dataPath, 5 is expected to be returned.
            exportWebResult = this.sitessAdapter.ExportWeb(Constants.ExportJobName, exportUrl, dataPath, true, true, true, cabSize);

            #region Capture requirements

            // If 5 is returned, R91 can be captured.
            Site.Log.Add(LogEntryKind.Debug, "Verify MS-SITESS_R91");

            // Verify MS-SITESS requirement: MS-SITESS_R91
            Site.CaptureRequirementIfAreEqual<int>(
                5,
                exportWebResult,
                91,
                @"[In ExportWebResponse] If the value of ExportWebResult is 5, it specifies ExportFileNoAccess: The location specified in the dataPath is not accessible.");

            // If 5 is returned, R57 can be captured.
            this.VerifyExportWebErrorCode(exportWebResult);

            // Verify that Microsoft Windows SharePoint Services 3.0 and above support operation ExportWeb.
            this.VerifyOperationExportWeb();
            #endregion Capture requirements
        }