Exemple #1
0
        public void OpenConnection_OpensSqlServerConnectionWhenCurrentConnectionHasBeenDisposedPrior()
        {
            var database = new SqlDb(_testConn);
            _testConn.Dispose();

            database.OpenConnection();

            Assert.IsTrue(_testConn.State == ConnectionState.Open);
        }
Exemple #2
0
        public void OpenConnection_ThrowsDBExceptionWhenConnectionIsEmpty()
        {
            // Arrange
            var database = new SqlDb(new SqlConnection());

            // Act
            database.OpenConnection();

            // Assert
            Assert.IsTrue(_testConn.State == ConnectionState.Open);
        }
Exemple #3
0
        public void OpenConnection_OpensSqlServerConnection()
        {
            // Arrange
            var database = new SqlDb(_testConn);

            // Act
            database.OpenConnection();

            // Assert
            Assert.IsTrue(_testConn.State == ConnectionState.Open);
        }