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();
        }
Exemple #2
0
        protected override void TestInitialize()
        {
            base.TestInitialize();
            sutAdapter = BaseTestSite.GetAdapter <ISUTControlAdapter>();
            EnvironmentConfig.LoadParameters(BaseTestSite);
            server = new TestServer();
            server.Initialize(BaseTestSite);
            bool       isDeploy = EnvironmentConfig.TestDeployment;
            StackTrace trace    = new System.Diagnostics.StackTrace();

            StackFrame[] frames = trace.GetFrames();
            ValidationModel.Initialize(BaseTestSite, isDeploy);
            ValidationModel.Reset();
        }