コード例 #1
0
        private void CatalogRegressionTest(ServerConfigurationManager AServerConfigurationManager)
        {
            // Create a test configuration
            ServerConfiguration LTestConfiguration = AServerConfigurationManager.GetTestConfiguration("TestInstance");

            // Reset the instance
            AServerConfigurationManager.ResetInstance();

            // Start a server based on the StoreRegression instance
            Server LServer = AServerConfigurationManager.GetServer();

            LServer.Start();

            // Stop the server
            LServer.Stop();

            // Start the server
            LServer.Start();

            // Stop the server
            LServer.Stop();

            // Reset the instance
            AServerConfigurationManager.ResetInstance();
        }
コード例 #2
0
        public void FixtureTearDown()
        {
            if (FDataSession != null)
            {
                // Close the data session
                FDataSession.Close();
            }

            // Send to stop the server
            FProcess.StandardInput.WriteLine();

            // Wait for the process
            FProcess.WaitForExit(30000);

            if (!FProcess.HasExited)
            {
                FProcess.Kill();
            }

            // Wait a little bit longer
            FProcess.WaitForExit(5000);

            // Try to reset the instance
            FConfigurationManager.ResetInstance();
        }
コード例 #3
0
        public void SetUpFixture()
        {
            FServerConfigurationManager = new SQLCEServerConfigurationManager();
            FConfiguration = FServerConfigurationManager.GetTestConfiguration("TestInstance");
            FServerConfigurationManager.ResetInstance();
            FServer = FServerConfigurationManager.GetServer();
            FServer.Start();

            IServerSession LSession = FServer.Connect(new SessionInfo("Admin", ""));

            try
            {
                IServerProcess LProcess = LSession.StartProcess(new ProcessInfo(LSession.SessionInfo));
                try
                {
                    LProcess.ExecuteScript("EnsureLibraryRegistered('Frontend');");
                    LProcess.ExecuteScript("EnsureLibraryRegistered('TestFramework.Coverage.Base');");
                }
                finally
                {
                    LSession.StopProcess(LProcess);
                }
            }
            finally
            {
                FServer.Disconnect(LSession);
            }
        }
コード例 #4
0
 public void TearDownFixture()
 {
     FServer.Stop();
     FServerConfigurationManager.ResetInstance();
 }