Esempio n. 1
0
        public static void BaseInitialize(TestContext context)
        {
            TestClassBase.Initialize(context);

            // load ptfconfig properties
            EnvironmentConfig.LoadParameters(BaseTestSite);
            EnvironmentConfig.CheckParameters(BaseTestSite);

            // initialize controller adapter
            SutAdapter      = BaseTestSite.GetAdapter <ISUTControlAdapter>();
            AsyncSutAdapter = new SUTControlAdapterAsync(SutAdapter);

            // initialize client adapter
            ClientAdapter = BaseTestSite.GetAdapter <IMSADFSPIPClientAdapter>();
            if (!m_sslCertBinded)
            {
                ClientAdapter.BindCertificate(new X509Certificate2(
                                                  EnvironmentConfig.TLSServerCertificatePath,
                                                  EnvironmentConfig.TLSServerCertificatePassword));
                m_sslCertBinded = true;
            }

            // initialize server data model and handler factory
            ServerDataModel = ServerDataModel.InitiateServerDataModel();
        }
Esempio n. 2
0
        public static void ClassInitialize(TestContext testContext)
        {
            TestClassBase.Initialize(testContext);

            adapter    = BaseTestSite.GetAdapter <IMS_WEBSSAdapter>();
            sutAdapter = BaseTestSite.GetAdapter <IMS_WEBSSSUTControlAdapter>();
        }
Esempio n. 3
0
        public static void ClassInitialize(TestContext testContext)
        {
            TestClassBase.Initialize(testContext);

            // Execute the MS-WOPI initialization
            if (!TestSuiteHelper.VerifyRunInSupportProducts(TestSuiteBase.BaseTestSite))
            {
                return;
            }

            TestSuiteHelper.InitializeTestSuite(TestSuiteBase.BaseTestSite);
            WopiAdapter   = TestSuiteHelper.WOPIProtocolAdapter;
            SutController = TestSuiteHelper.WOPISutControladapter;
            WopiSutManageCodeControlAdapter = TestSuiteHelper.WOPIManagedCodeSUTControlAdapter;
            CurrentTestClientName           = TestSuiteHelper.CurrentTestClientName;

            if (string.IsNullOrEmpty(UploadedFileUrl))
            {
                UploadedFileUrl = Common.GetConfigurationPropertyValue("UploadedFileUrl", TestSuiteBase.BaseTestSite);
            }

            if (string.IsNullOrEmpty(TargetDocLibraryListName))
            {
                TargetDocLibraryListName = Common.GetConfigurationPropertyValue("MSWOPIDocLibraryName", TestSuiteBase.BaseTestSite);
            }

            if (null == AddedFilesRecorder)
            {
                AddedFilesRecorder = new List <string>();
            }
        }
Esempio n. 4
0
 public static void ClassInitialize(TestContext testContext)
 {
     // initialize test context to your ptf config file.
     TestClassBase.Initialize(testContext);
     serverControlAdapter = TestClassBase.BaseTestSite.GetAdapter <Microsoft.Protocols.TestSuites.ActiveDirectory.Apds.IApdsSutControlAdapter>();
     serverControlAdapter.ConfigNTLMRegistryKey();
 }
 public static void TestSuiteClassInitialize(TestContext testContext)
 {
     // A method is used to initialize the variables.
     TestClassBase.Initialize(testContext);
     CPSWSAdapter      = BaseTestSite.GetAdapter <IMS_CPSWSAdapter>();
     SutControlAdapter = BaseTestSite.GetAdapter <IMS_CPSWSSUTControlAdapter>();
 }
        public static void ClassInitialize(TestContext testContext)
        {
            // A method is used to initialize the variables.
            TestClassBase.Initialize(testContext);
            if (null == MSCopysAdapter)
            {
                MSCopysAdapter = BaseTestSite.GetAdapter <IMS_COPYSAdapter>();
            }

            if (null == MSCOPYSSutControlAdapter)
            {
                MSCOPYSSutControlAdapter = BaseTestSite.GetAdapter <IMS_COPYSSUTControlAdapter>();
            }

            if (null == FilesUrlRecordOfDestination)
            {
                FilesUrlRecordOfDestination = new List <string>();
            }

            if (string.IsNullOrEmpty(SourceFileContentBase64Value))
            {
                string sourceFileContent        = Common.GetConfigurationPropertyValue("SourceFileContents", BaseTestSite);
                byte[] souceFileContentBinaries = Encoding.UTF8.GetBytes(sourceFileContent);
                SourceFileContentBase64Value = Convert.ToBase64String(souceFileContentBinaries);
            }
        }
Esempio n. 7
0
        public static void BaseInitialize(TestContext context)
        {
            TestClassBase.Initialize(context);
            string defaultProtocolDocShortName;

            PtfPropUtility.GetPtfPropertyValue(BaseTestSite, "ProtocolName", out defaultProtocolDocShortName);
            BaseTestSite.DefaultProtocolDocShortName = defaultProtocolDocShortName;
        }
Esempio n. 8
0
        public static void ClassInitialize(TestContext testContext)
        {
            TestClassBase.Initialize(testContext);

            // Initializing the ITestSite object
            if (null == TestScenarioDeleteWin2012TestSite)
            {
                TestScenarioDeleteWin2012TestSite = TestClassBase.BaseTestSite;
                TestScenarioDeleteWin2012TestSite.DefaultProtocolDocShortName = "MS-ADTS-LDAP";
            }
            adLdapModelAdapter = AD_LDAPModelAdapter.Instance(TestScenarioDeleteWin2012TestSite);
            adLdapModelAdapter.Initialize();
        }
Esempio n. 9
0
        public static void ClassInitialize(TestContext testContext)
        {
            TestClassBase.Initialize(testContext);

            try
            {
                SUTAdapter      = TestClassBase.BaseTestSite.GetAdapter <IXXXX_SUTControlAdapter>();
                protocolAdapter = TestClassBase.BaseTestSite.GetAdapter <IXXXX_Adapter>();
            }
            catch (Exception ex)
            {
                TestClassBase.BaseTestSite.Assume.Inconclusive("ClassInitialize: Unexpected Exception - " + ex.Message);
            }
        }
Esempio n. 10
0
        public static void ClassInitialize(TestContext testContext)
        {
            // A method is used to initialize the variables.
            TestClassBase.Initialize(testContext);

            if (null == SHDACCWSAdapter)
            {
                SHDACCWSAdapter = BaseTestSite.GetAdapter <IMS_SHDACCWSAdapter>();
            }

            if (null == SHDACCWSSUTControlAdapter)
            {
                SHDACCWSSUTControlAdapter = BaseTestSite.GetAdapter <IMS_SHDACCWSSUTControlAdapter>();
            }
        }
Esempio n. 11
0
        public static void ClassInitialize(TestContext testContext)
        {
            // A method is used to initialize the variables.
            TestClassBase.Initialize(testContext);

            Adapter           = BaseTestSite.GetAdapter <IMS_VIEWSSAdapter>();
            SutControlAdapter = BaseTestSite.GetAdapter <IMS_VIEWSSSUTControlAdapter>();

            string displayListName = Common.GetConfigurationPropertyValue("DisplayListName", BaseTestSite);

            TestSuiteBase.ListGUID = SutControlAdapter.GetListGuidByName(displayListName);

            if (TestSuiteBase.OriginalDefaultViewChecked == false)
            {
                // Get name of the default view.
                TestSuiteBase.OriginalDefaultViewName    = SutControlAdapter.GetListAndView(displayListName);
                TestSuiteBase.OriginalDefaultViewChecked = true;
            }
        }
Esempio n. 12
0
        public static void ClassInitialize(TestContext testContext)
        {
            TestClassBase.Initialize(testContext);

            if (null == StartedTaskIdsRecorder)
            {
                StartedTaskIdsRecorder = new List <string>();
            }

            if (null == UploadedFilesUrlRecorder)
            {
                UploadedFilesUrlRecorder = new List <string>();
            }

            if (null == ProtocolAdapter)
            {
                ProtocolAdapter = BaseTestSite.GetAdapter <IMS_WWSPAdapter>();
            }

            if (null == SutController)
            {
                SutController = BaseTestSite.GetAdapter <IMS_WWSPSUTControlAdapter>();
            }
        }
Esempio n. 13
0
 public static void ClassInitialize(TestContext testContext)
 {
     TestClassBase.Initialize(testContext);
 }
Esempio n. 14
0
 public static void ClassInitialize(TestContext testContext)
 {
     TestClassBase.Initialize(testContext, "TestProperties");
 }
Esempio n. 15
0
 public static void ClassInitialize(TestContext testContext)
 {
     TestClassBase.Initialize(testContext);
     SWNTestUtility.BaseTestSite = BaseTestSite;
 }
Esempio n. 16
0
 public static void ClassInitialize(TestContext testContext)
 {
     TestClassBase.Initialize(testContext);
     ITestSite testSite = TestClassBase.BaseTestSite;
 }
 public static void BaseInitialize(TestContext context)
 {
     TestClassBase.Initialize(context);
     BaseTestSite.DefaultProtocolDocShortName = BaseTestSite.Properties["ProtocolName"];
 }
Esempio n. 18
0
 public static void ClassInitialize(TestContext context)
 {
     // initialize test context to your ptf config file.
     TestClassBase.Initialize(context, "AD_ServerTestSuite");
 }
Esempio n. 19
0
 public static void ClassInitialize(TestContext context)
 {
     TestClassBase.Initialize(context, "MS-SMBD_ServerTestSuite");
 }
 public static void ClassInitialize(TestContext testContext)
 {
     TestClassBase.Initialize(testContext, "AD_ServerTestSuite");
 }
 public static void ClassInitialize(TestContext testContext)
 {
     TestClassBase.Initialize(testContext, "TestLogging");
 }
 public static void ClassInitialize(TestContext testContext)
 {
     TestClassBase.Initialize(testContext);
     EnvironmentConfig.ServerVer = (ServerVersion)AD_LDAPModelAdapter.Instance(BaseTestSite).PDCOSVersion;
 }
Esempio n. 23
0
 public static void TestSuiteClassInitialize(TestContext context)
 {
     TestClassBase.Initialize(context);
 }
 public static void ClassInitialize(TestContext testContext)
 {
     TestClassBase.Initialize(testContext, "TestRequirementCapture");
     BaseTestSite.DefaultProtocolDocShortName = "TestRequirementCapture";
 }
Esempio n. 25
0
 public static void ClassInitialize(TestContext context)
 {
     // Setup test site
     TestClassBase.Initialize(context);
 }
        public static void ClassInitialize(TestContext testContext)
        {
            TestClassBase.Initialize(testContext);

            // Initializing the ITestSite object
            if (null == DataSchemaSite)
            {
                DataSchemaSite = TestClassBase.BaseTestSite;
            }
            adAdapter = new ADDataSchemaAdapter();
            adAdapter.Initialize(DataSchemaSite);

            //Model for AD/DS
            dcModel = new ModelDomainController(adAdapter.rootDomainDN, null);

            //Protocol Short Name.
            DataSchemaSite.DefaultProtocolDocShortName = "MS-ADTS-Schema";

            //Specifying the windows version
            ServerVersion serverVersion = (ServerVersion)adAdapter.PDCOSVersion;

            if (serverVersion == ServerVersion.Win2003)
            {
                serverOS = OSVersion.WinSvr2003;
            }
            else if (serverVersion == ServerVersion.Win2008)
            {
                serverOS = OSVersion.WinSvr2008;
            }
            else if (serverVersion == ServerVersion.Win2008R2)
            {
                serverOS = OSVersion.WinSvr2008R2;
            }
            else if (serverVersion == ServerVersion.Win2012)
            {
                serverOS = OSVersion.WinSvr2012;
            }
            else if (serverVersion == ServerVersion.Win2012R2)
            {
                serverOS = OSVersion.WinSvr2012R2;
            }
            else if (serverVersion == ServerVersion.Win2016)
            {
                serverOS = OSVersion.Win2016;
            }
            else if (serverVersion == ServerVersion.Winv1803)
            {
                serverOS = OSVersion.Winv1803;
            }
            else
            {
                serverOS = OSVersion.OtherOS;
            }

            //Storing the XML paths.
            string[] tdSources;
            if (serverVersion <= ServerVersion.Win2012R2)
            {
                tdSources = adAdapter.TDXmlPath.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            }
            else
            {
                tdSources = adAdapter.OpenXmlPath.Split(new char[] { ',' }, StringSplitOptions.RemoveEmptyEntries);
            }

            Map <string, string> rootDomainDNSubs = new Map <string, string>().Add("<RootDomainDN>", adAdapter.rootDomainDN);

            DSSchemaLoadResult = dcModel.LoadSchema(
                SchemaReader.ReadSchema(
                    tdSources,
                    null,
                    true,
                    serverOS),
                rootDomainDNSubs,
                serverOS);

            if (adAdapter.RunLDSTestCases)
            {
                string[] ldsTdSource;
                if (serverVersion <= ServerVersion.Win2012R2)
                {
                    ldsTdSource = adAdapter.LdsTDXmlPath.Split(',');
                }
                else
                {
                    ldsTdSource = adAdapter.LdsOpenXmlPath.Split(',');
                }
                //Model for AD/LDS
                adamModel = new ModelDomainController(adAdapter.LDSRootObjectName, null);
                Map <string, string> adamRootDomainDNSubs = new Map <string, string>().Add("<RootDomainDN>", adAdapter.LDSRootObjectName);

                LDSSchemaLoadResult = adamModel.LoadSchema(
                    SchemaReader.ReadSchema(
                        ldsTdSource,
                        null,
                        true,
                        serverOS),
                    adamRootDomainDNSubs,
                    serverOS);
            }
        }
 public static void ClassInitialize(TestContext testContext)
 {
     TestClassBase.Initialize(testContext, "TestAdapter");
 }
Esempio n. 28
0
 public static void BaseInitialize(TestContext context)
 {
     TestClassBase.Initialize(context);
 }