예제 #1
0
 private static ITestInstaller GetTestInstaller(Assembly testAssembly, string testResourcePath)
 {
     var embeddedTextResourceReader = new EmbeddedTextResourceReader();
     var testClassDiscoverer = new AssemblyResourceTestClassDiscoverer(testAssembly, testResourcePath, embeddedTextResourceReader);
     var testClassInstaller = new TsqltTestClassInstaller(embeddedTextResourceReader);
     return new TestInstaller(testClassDiscoverer, testClassInstaller);
 }
예제 #2
0
 private static ITestEnvironmentBootstrapper GetBootstrapper(IDbMigrator dbMigrator, ISqlLocalDbInstance sqlLocalDbInstance)
 {
     // Poor-man's Dependency Injection
     var embeddedTextResourceReader = new EmbeddedTextResourceReader();
     var sqlBatchExtractor = new SqlBatchExtractor();
     var tsqltInstaller = new EmbeddedResourceTsqltInstaller(embeddedTextResourceReader, sqlBatchExtractor);
     var sqlCommandExecutor = new SqlCommandExecutor();
     var databaseDropper = new DatabaseDropper(sqlCommandExecutor);
     var testDatabaseCreator = new TestDatabaseCreator(DatabaseName, databaseDropper, sqlCommandExecutor);
     var testDatabaseInstaller = new TestDatabaseInstaller(tsqltInstaller, testDatabaseCreator);
     return new SqlLocalDbTestEnvironmentBootstrapper(dbMigrator ?? new DefaultDbMigrator(),
         testDatabaseInstaller, sqlLocalDbInstance);
 }