コード例 #1
0
        public void NonWindowsLoginTest()
        {
            ConnectionSetup connectionSetup = new ConnectionSetup(hostName, "TestUser", "TestPass", false);
            connectionSetup.Timeout = 1;
            SQLServerConnector conn = new SQLServerConnector(connectionSetup);

            Assert.IsNotEmpty(conn.GetDatabaseNames());
        }
コード例 #2
0
        public void DatabaseExistsTest()
        {
            ConnectionSetup connectionSetup = new ConnectionSetup(hostName, "", "", true);
            connectionSetup.Timeout = 1;
            SQLServerConnector conn = new SQLServerConnector(connectionSetup);

            Assert.Contains(dbTestName, conn.GetDatabaseNames().ToList());
        }
コード例 #3
0
        public void TimeoutTest()
        {
            string hostNameDoesntExist = "testest";
            ConnectionSetup connectionSetup = new ConnectionSetup(hostNameDoesntExist, "", "", true);
            connectionSetup.Timeout = 1;
            SQLServerConnector conn = new SQLServerConnector(connectionSetup);

            conn.GetDatabaseNames();
        }