public void SetConexaoParaPostgreSql() { string connString = String.Format("Server={0};Port={1};User Id={2};Password={3};Database={4};" , LOCAL_HOST, PORTA_5432, USER, SENHA, JOKE_BD); JokeConfigurationBuilder.NewConfigurationToPostgreSQL() .Host(LOCAL_HOST) .Port(PORTA_5432) .Username(USER) .Password(SENHA) .DataBase(JOKE_BD) .BuildConfiguration(); target = JokeConfiguration.Get(); Assert.That(target.ConnectionString(), Is.EqualTo(connString)); }
private DbConnection CreateDbConnection() { return((DbConnection)DbConnectionConstructor(). Invoke(new object[] { JokeConfiguration.Get().ConnectionString() })); }
private ConstructorInfo DbConnectionConstructor() { return(JokeConfiguration.Get() .DbConnectionType() .GetConstructor(new[] { typeof(string) })); }
private ConstructorInfo DbDataAdapterConstructor() { return(JokeConfiguration.Get() .DbDataAdapterType() .GetConstructor(new[] { typeof(string), connection.GetType() })); }