public void GetIAVSCDatabaseByNoneDatabaseType() { Assert.Throws <NotSupportedDatabaseException>(() => AVSCDatabaseFactory.GetIAVSCDatabase( DatabaseType.None, connectionString: string.Empty ) ); }
public void GetIAVSCDatabaseByConfigurationSuccess() { var databaseSettingsSection = GetDatabaseSettings("DatabaseSettings"); var avscDatabase = AVSCDatabaseFactory.GetIAVSCDatabase(databaseSettingsSection); avscDatabase.GeneratorId.Should().Be("MySql"); }
public void GetIAVSCDatabaseByParametersAndNoneDatabaseType() { Assert.Throws <NotSupportedDatabaseException>(() => AVSCDatabaseFactory.GetIAVSCDatabase( DatabaseType.None, serverName: string.Empty, username: string.Empty, password: string.Empty, databaseName: string.Empty ) ); }
public void GetIAVSCDatabaseByDatabaseType ( DatabaseType databaseType, string expectedGeneratorId, string connectionString, Type expectedDatabaseType ) { var avscDatabase = AVSCDatabaseFactory.GetIAVSCDatabase( databaseType, connectionString); avscDatabase.GeneratorId.Should().Be(expectedGeneratorId); var iDbConnection = avscDatabase.GetDbConnection(); iDbConnection.GetType().Should().Be(expectedDatabaseType); }
public void GetIAVSCDatabaseByParametersSuccess ( DatabaseType databaseType, string expectedGeneratorId, string serverName, Type expectedDatabaseType ) { var avscDatabase = AVSCDatabaseFactory.GetIAVSCDatabase( databaseType, serverName, username: string.Empty, password: string.Empty, databaseName: string.Empty ); avscDatabase.GeneratorId.Should().Be(expectedGeneratorId); var iDbConnection = avscDatabase.GetDbConnection(); iDbConnection.GetType().Should().Be(expectedDatabaseType); }