Example #1
0
        public void OracleTests()
        {
            // arrange
            ConnectionParameters conParams = new ConnectionParameters
            {
                Type     = "Oracle",
                Name     = "Oracle Connection",
                Host     = Settings.Default.oracle_host,
                Database = Settings.Default.oracle_service,
                Port     = Settings.Default.oracle_port,
                User     = Settings.Default.oracle_user,
                Password = Settings.Default.oracle_password
            };

            Assert.IsTrue(DBWorker.ConfigureDBConnection(conParams), "Oracle connection configured");
            Assert.IsTrue(DBWorker.OpenConnection(), "Oracle connection opened");
            Assert.IsTrue(DBWorker.IsOpen(), "Oracle connection is currently open");
            Assert.IsFalse(string.IsNullOrEmpty(DBWorker.GetConnectionName()), "Oracle connection name correct.");
            Assert.IsTrue(DBWorker.CloseConnection(), "Oracle connection closed");
            Assert.IsTrue(DBWorker.TryConnection(), "Try Connection");
            Assert.IsTrue(DBWorker.DisposeConnection(), "Connection disposed");

            DBWorker.Reset();
        }