public void TestChangeDatabase()
        {
            MonetDbConnection conn = new MonetDbConnection(TestConnectionString);

            conn.Open();
            Assert.IsTrue(conn.State == System.Data.ConnectionState.Open);

            conn.ChangeDatabase("somethingelse");
        }
示例#2
0
        public void TestChangeDatabase()
        {
            Assert.ThrowsException <MonetDbException>(() =>
            {
                var conn = new MonetDbConnection(TestConnectionString);
                conn.Open();
                Assert.IsTrue(conn.State == ConnectionState.Open);

                conn.ChangeDatabase("demo2");
            },
                                                      "This should throw a message that the database doesn't exist, but it's successfully changing the database name and reconnecting if it's doing so");
        }