public void TestFixtureSetUp() { var connectionstringParametersValidator = new SqlServerConnectionstringArgumentsValidator(); var sqlServerConnectionstringBuilderStrategy = new SqlServerConnectionstringBuilderStrategy(connectionstringParametersValidator); _connectionstringFactory = new ConnectionstringFactory(sqlServerConnectionstringBuilderStrategy); }
public IConnectionstringBuilderStrategy Make(DatabaseType databaseType) { IConnectionstringBuilderStrategy connectionstringBuilderStrategy = null; switch (databaseType) { case DatabaseType.Access: connectionstringBuilderStrategy = new AccessConnectionstringBuilderStrategy(new AccessConnectionstringArgumentsValidator()); break; case DatabaseType.SqlServer: connectionstringBuilderStrategy = new SqlServerConnectionstringBuilderStrategy(new SqlServerConnectionstringArgumentsValidator()); break; case DatabaseType.Oracle: connectionstringBuilderStrategy = new OracleConnectionstringBuilderStrategy(null); break; } return connectionstringBuilderStrategy; }