public void TestConnectViaSecureString() { String[] connEntries = connectionString.Split(';'); String connectionStringWithoutPassword = ""; using (var conn = new SnowflakeDbConnection()) { var password = new System.Security.SecureString(); foreach (String entry in connEntries) { if (!entry.StartsWith("password="******"TESTDB_DOTNET", conn.Database); Assert.AreEqual(conn.State, ConnectionState.Open); conn.ChangeDatabase("SNOWFLAKE_SAMPLE_DATA"); Assert.AreEqual("SNOWFLAKE_SAMPLE_DATA", conn.Database); conn.Close(); } }
public void testSwitchDb() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = connectionString; Assert.AreEqual(conn.State, ConnectionState.Closed); conn.Open(); Assert.AreEqual("TESTDB_DOTNET", conn.Database); Assert.AreEqual(conn.State, ConnectionState.Open); conn.ChangeDatabase("SNOWFLAKE_SAMPLE_DATA"); Assert.AreEqual("SNOWFLAKE_SAMPLE_DATA", conn.Database); conn.Close(); } }
public void TestSwitchDb() { using (IDbConnection conn = new SnowflakeDbConnection()) { conn.ConnectionString = ConnectionString; Assert.AreEqual(conn.State, ConnectionState.Closed); conn.Open(); Assert.AreEqual(testConfig.database.ToUpper(), conn.Database); Assert.AreEqual(conn.State, ConnectionState.Open); conn.ChangeDatabase("SNOWFLAKE_SAMPLE_DATA"); Assert.AreEqual("SNOWFLAKE_SAMPLE_DATA", conn.Database); conn.Close(); } }