コード例 #1
0
        public static void AssemblyCleanup()
        {
            // Delete SampleDB
            var defaultDatabase = new TestDbUtilities(DatabaseName.Default);

            defaultDatabase.DeleteLocalDb(SampleDbConnection);
        }
コード例 #2
0
        public static void AssemblyInitialize(TestContext context)
        {
            // Create SampleDB
            var sampleDbDatabase = new TestDbUtilities(DatabaseName.SampleDB);

            if (sampleDbDatabase.IsLocalDbExists())
            {
                sampleDbDatabase.DeleteLocalDb();
            }
            sampleDbDatabase.CreateDatabase();
        }
コード例 #3
0
        private static void CreateLocalDB()
        {
            // SampleDB
            var sampleDbDatabase = new TestDbUtilities(DatabaseName.SampleDB);

            if (sampleDbDatabase.IsLocalDbExists())
            {
                sampleDbDatabase.DeleteLocalDb();
            }
            sampleDbDatabase.CreateDatabase();

            SampleDbConnection = string.Format(TestDbConnection.LocalDb.Database, DatabaseName.SampleDB);
        }
コード例 #4
0
        private static void DeleteLocalDB()
        {
            var defaultDatabase = new TestDbUtilities(DatabaseName.Default);

            defaultDatabase.DeleteLocalDb(SampleDbConnection);
        }