Esempio n. 1
0
        public void Test10CreateNewEfDatabase()
        {
            //SETUP

            //EXECUTE
            DatabaseCreators.DeleteAndCreateEfDatabase <TestEf6SchemaCompareDb>(MiscConstants.GetEfDatabaseConfigName(), true);

            //VERIFY
        }
Esempio n. 2
0
        public void Test60EfCreatedDatabaseExists()
        {
            //SETUP

            //EXECUTE
            var ex =
                Assert.Throws <InvalidOperationException>(
                    () =>
                    DatabaseCreators.DeleteAndCreateEfDatabase <TestEf6SchemaCompareDb>(MiscConstants.GetEfDatabaseConfigName()));

            //VERIFY
            ex.Message.ShouldEqual(
                "You attempted to wipe the main database that your DbContext points to. To do this you must set the second parameter to this method to true.");
        }