Beispiel #1
0
        static CoreTest()
        {
            //Delete old db files
            var oldDbFiles = Directory.GetFiles(Directory.GetCurrentDirectory(), "*.sdf", SearchOption.AllDirectories);

            foreach (var file in oldDbFiles)
            {
                try
                {
                    File.Delete(file);
                }
                catch { }
            }

            //Delete App_data folder
            var appData = new EnvironmentProvider().GetAppDataPath();

            if (Directory.Exists(appData))
            {
                Directory.Delete(appData, true);
            }

            TestDbHelper.CreateDataBaseTemplate();
        }
Beispiel #2
0
 protected void WithRealDb()
 {
     _db = TestDbHelper.GetEmptyDatabase();
     Mocker.SetConstant(Db);
 }