public void DropViewLogging()
 {
     //Arrange
     CreateViewTask.CreateOrAlter(SqlConnection, "dbo.DropView", "SELECT 1 AS Test");
     //Act
     DropViewTask.Drop(SqlConnection, "dbo.DropView");
     //Assert
     Assert.Equal(2, CountLogEntries("DropViewTask"));
 }
Example #2
0
        public void Drop(IConnectionManager connection)
        {
            //Arrange
            CreateViewTask.CreateOrAlter(connection, "DropViewTest", "SELECT 1 AS Test");
            Assert.True(IfTableOrViewExistsTask.IsExisting(connection, "DropViewTest"));

            //Act
            DropViewTask.Drop(connection, "DropViewTest");

            //Assert
            Assert.False(IfTableOrViewExistsTask.IsExisting(connection, "DropTableTest"));
        }
Example #3
0
        public void Drop(IConnectionManager connection)
        {
            //Arrange
            string viewtext = "SELECT 1 AS test";

            if (connection.GetType() == typeof(OracleConnectionManager))
            {
                viewtext += " FROM DUAL";
            }
            CreateViewTask.CreateOrAlter(connection, "DropViewTest", viewtext);
            Assert.True(IfTableOrViewExistsTask.IsExisting(connection, "DropViewTest"));

            //Act
            DropViewTask.Drop(connection, "DropViewTest");

            //Assert
            Assert.False(IfTableOrViewExistsTask.IsExisting(connection, "DropTableTest"));
        }