using Microsoft.Data.Tools.Schema.Sql.UnitTesting; namespace BB_Grishina { [TestClass()] public class SqlServerUnitTest1 : SqlDatabaseTestClass { public SqlServerUnitTest1() { InitializeComponent(); } [TestInitialize()] public void TestInitialize() { base.InitializeTest(); } [TestCleanup()] public void TestCleanup() { base.CleanupTest(); } [TestMethod()] public void SqlTest1() { SqlDatabaseTestActions testActions = this.SqlTest1Data; // Execute the pre-test script // System.Diagnostics.Trace.WriteLineIf((testActions.PretestAction != null), "Executing pre-test script..."); SqlExecutionResult[] pretestResults = TestService.Execute(this.PrivilegedContext, this.PrivilegedContext, testActions.PretestAction); // Execute the test script // System.Diagnostics.Trace.WriteLineIf((testActions.TestAction != null), "Executing test script..."); SqlExecutionResult[] testResults = TestService.Execute(this.ExecutionContext, this.PrivilegedContext, testActions.TestAction); // Execute the post-test script // System.Diagnostics.Trace.WriteLineIf((testActions.PosttestAction != null), "Executing post-test script..."); SqlExecutionResult[] posttestResults = TestService.Execute(this.PrivilegedContext, this.PrivilegedContext, testActions.PosttestAction); } #region Designer support code /// /// Required method for Designer support - do not modify /// the contents of this method with the code editor. /// private void InitializeComponent() { this.SqlTest1Data = new SqlDatabaseTestActions(); // // SqlTest1Data // this.SqlTest1Data.PosttestAction = null; this.SqlTest1Data.PretestAction = null; this.SqlTest1Data.TestAction = null; } #endregion #region Additional test attributes // // You can use the following additional attributes as you write your tests: // // Use ClassInitialize to run code before running the first test in the class // [ClassInitialize()] // public static void MyClassInitialize(TestContext testContext) { } // // Use ClassCleanup to run code after all tests in a class have run // [ClassCleanup()] // public static void MyClassCleanup() { } // #endregion private SqlDatabaseTestActions SqlTest1Data; } }