public void CorrectlyGeneratesConnectionStringWithDatabaseAndUserSecurityAndDatabaseExcluded() { IConnectionStringGenerator generator = new ConnectionStringGenerator(); ConnectionSettings settings = new ConnectionSettings("server", "db", false, "usr", "pwd"); string connString = generator.GetConnectionString(settings, false); Assert.AreEqual("Data Source=server;User ID=usr;Password=pwd;", connString); }
public void CorrectlyGeneratesConnectionStringWithDatabaseAndIntegratedSecurityAndDatabaseExcluded() { IConnectionStringGenerator generator = new ConnectionStringGenerator(); ConnectionSettings settings = new ConnectionSettings("server", "db", true, string.Empty, string.Empty); string connString = generator.GetConnectionString(settings, false); Assert.AreEqual("Data Source=server;Integrated Security=True;", connString); }