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); }
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); }