Exemplo n.º 1
0
        public void OdbcConnectionWithoutPooling(TestCaseResult result)
        {
            string             host             = TestSettings.GetString("HOST");
            string             connectionString = "HOST=" + host + ";UID=dba;PWD=dba;Pooling=False;";
            VirtuosoConnection conn             = new VirtuosoConnection(connectionString);

            try
            {
                conn.Open();
                conn.Close();
            }
            finally
            {
                conn.Dispose();
            }
        }
Exemplo n.º 2
0
        protected virtual void Dispose(bool isDisposing)
        {
            if (_isDisposed)
            {
                return;
            }

            if (isDisposing)
            {
                if (Connection != null)
                {
                    Connection.Close();
                    Connection.Dispose();
                }
            }

            _isDisposed = true;
        }
Exemplo n.º 3
0
        public void State(TestCaseResult result)
        {
            string             host             = TestSettings.GetString("HOST");
            string             connectionString = "HOST=" + host + ";UID=dba;PWD=dba;";
            VirtuosoConnection conn             = new VirtuosoConnection(connectionString);

            try
            {
                result.FailIfNotEqual(ConnectionState.Closed, conn.State);
                conn.Open();
                result.FailIfNotEqual(ConnectionState.Open, conn.State);
                conn.Close();
                result.FailIfNotEqual(ConnectionState.Closed, conn.State);
            }
            finally
            {
                conn.Dispose();
            }
        }
Exemplo n.º 4
0
        public void PersistSecurityInfo(TestCaseResult result)
        {
            string             host             = TestSettings.GetString("HOST");
            string             connectionString = "HOST=" + host + ";UID=dba;PWD=dba;Persist Security Info=true;";
            VirtuosoConnection conn             = new VirtuosoConnection(connectionString);

            try
            {
                result.FailIfNotEqual(connectionString, conn.ConnectionString);
                conn.Open();
                result.FailIfNotEqual(connectionString, conn.ConnectionString);
                conn.Close();
                result.FailIfNotEqual(connectionString, conn.ConnectionString);
            }
            finally
            {
                conn.Dispose();
            }
        }
Exemplo n.º 5
0
        public void DisposeInvalid(TestCaseResult result)
        {
            VirtuosoConnection conn = null;

            try
            {
                string connectionString = "InvalidConnectionString";
                conn = new VirtuosoConnection(connectionString);
            }
            catch (ArgumentException)
            {
                // suppress ArgumentException
            }
            finally
            {
                if (conn != null)
                {
                    conn.Dispose();
                }
            }
        }
Exemplo n.º 6
0
        public void DisposeNew(TestCaseResult result)
        {
            VirtuosoConnection conn = new VirtuosoConnection();

            conn.Dispose();
        }
Exemplo n.º 7
0
 public void Dispose()
 {
     Connection.Close();
     Connection.Dispose();
 }