public void CanHaveSqlAuthentication() { var args = new[] {"--server", "server", "--database", "database", "--username", "user", "--password", "pass"}; var options = new ConnectionStringOptions(); var passed = ParseArguments(args, options); Assert.IsTrue(passed, "failed to parse args"); var builder = options.ConnectionStringBuilder(); Assert.AreEqual(false, builder.IntegratedSecurity); Assert.AreEqual("user", builder.UserID); Assert.AreEqual("pass", builder.Password); }
public void CanHaveIntegratedSecurity() { var args = new[] {"--server", "server", "--database", "database", "--integrated"}; var options = new ConnectionStringOptions(); var passed = ParseArguments(args, options); Assert.IsTrue(passed, "failed to parse args"); var builder = options.ConnectionStringBuilder(); Assert.AreEqual("server", builder.DataSource); Assert.AreEqual("database", builder.InitialCatalog); Assert.AreEqual(true, builder.IntegratedSecurity); }
public void UseTrustServerCert() { var args = new[] { "--server", "server", "--database", "database", "--username", "user", "--password", "pass", "--trust-server-certificate" }; var options = new ConnectionStringOptions(); var passed = ParseArguments(args, options); Assert.IsTrue(passed, "failed to parse args"); var builder = options.ConnectionStringBuilder(); Assert.AreEqual(true, builder.TrustServerCertificate); }