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

MSSITESS_S01_TC09_ImportingFailureImportFileNoAccess() private méthode

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

            #region Variables
            string siteUrl = Common.GetConfigurationPropertyValue(Constants.SiteUrl, this.Site);
            string exportUrl = Common.GetConfigurationPropertyValue(Constants.NormalSubsiteUrl, this.Site);
            string importUrl = siteUrl + "/" + this.newSubsite;
            string logPath = Common.GetConfigurationPropertyValue(Constants.SiteCollectionUrl, this.Site) + "/" + Common.GetConfigurationPropertyValue(Constants.ValidLibraryName, this.Site);
            string[] dataFiles = new string[] { exportUrl + "/" + Common.GetConfigurationPropertyValue(Constants.InvalidLibraryName, this.Site) + "/" + Constants.ExportJobName + Constants.CmpExtension };
            int importWebResult = 0;

            #endregion Variables

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

            // Invoke the ImportWeb operation with invalid dataFiles, 5 is expected to be returned.
            importWebResult = this.sitessAdapter.ImportWeb(Constants.ImportJobName, importUrl, dataFiles, logPath, true, true);

            #region Capture requirements

            this.VerifyImportWebErrorCode(importWebResult);

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

            // Verify MS-SITESS requirement: MS-SITESS_R270
            Site.CaptureRequirementIfAreEqual<int>(
                5,
                importWebResult,
                270,
                @"[In ImportWebResponse] [ImportWebResult:] If the value of ImportWebResult is 5, it specifies ImportFileNoAccess: At least one location specified in dataFiles is not accessible.");

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