public static void DbMigrationTest_ClassInitialize(TestContext context) { ServerTestHelper.ClassInitialize(context); //运行测试前,这个库升级到最新的内容,同时它的历史记录需要清空 using (var c = new RafyDbMigrationContext(UnitTestEntityRepositoryDataProvider.DbSettingName)) { c.RunDataLossOperation = DataLossOperation.All; if (IsTestDbSQLite()) { c.DeleteAllTables(); } else { c.HistoryRepository = new DbHistoryRepository(); } c.AutoMigrate(); c.ResetDbVersion(); if (!IsTestDbSQLite()) { c.ResetHistory(); } var dbProvider = DbMigrationProviderFactory.GetProvider(c.DbSetting); dbTypeConverter = (dbProvider.CreateRunGenerator() as SqlRunGenerator).DbTypeCoverter; }; }
public static void DbMigrationTest_ClassInitialize(TestContext context) { ServerTestHelper.ClassInitialize(context); //运行测试前,这个库升级到最新的内容,同时它的历史记录需要清空 using (var c = new RafyDbMigrationContext(UnitTestEntityRepositoryDataProvider.DbSettingName)) { c.HistoryRepository = new DbHistoryRepository(); c.RunDataLossOperation = DataLossOperation.All; //c.DeleteDatabase(); c.AutoMigrate(); c.ResetDbVersion(); c.ResetHistory(); }; }
public static void DT_ClassInitialize(TestContext context) { ServerTestHelper.ClassInitialize(context); }
public static void APT_ClassInitialize(TestContext context) { ServerTestHelper.ClassInitialize(context); RafyEnvironment.LoadPlugin(typeof(UserRepository).Assembly); }
public static void SNPT_ClassInitialize(TestContext context) { ServerTestHelper.ClassInitialize(context); RafyEnvironment.LoadPlugin(typeof(SerialNumberPlugin).Assembly); }
public static void SSPT_ClassInitialize(TestContext context) { ServerTestHelper.ClassInitialize(context); RafyEnvironment.LoadPlugin(typeof(SystemSettingsPlugin).Assembly); }
public static void FSPT_ClassInitialize(TestContext context) { ServerTestHelper.ClassInitialize(context); RafyEnvironment.LoadPlugin(typeof(FileStorageEntity).Assembly); }