public void BuildConnectionString2() { IDbConnectionStringBuilder connectionStringBuilder = new SqlServer2000ConnectionStringBuilder(); connectionStringBuilder.AppendKeyValuePair("host", "(local)"); connectionStringBuilder.AppendKeyValuePair("database", "dev"); connectionStringBuilder.AppendKeyValuePair("login", "sa"); connectionStringBuilder.AppendKeyValuePair("password", "op3nshut"); Assert.AreEqual( "data source=(local);initial catalog=dev;user id=sa;password=op3nshut;", connectionStringBuilder.ToString()); }
public void BuildConnectionString() { IDbConnectionStringBuilder connectionStringBuilder = new SqlServer2000ConnectionStringBuilder(); connectionStringBuilder.AppendKeyValuePair("Integrated-Security", "true"); connectionStringBuilder.AppendKeyValuePair("host", "(local)"); connectionStringBuilder.AppendKeyValuePair("database", "dev"); connectionStringBuilder.AppendKeyValuePair("foo", "bar"); Assert.AreEqual( "integrated security=true;data source=(local);initial catalog=dev;", connectionStringBuilder.ToString()); }