Exemple #1
0
        public void TestPreValidateSqlExecutionNullStatement()
        {
            using (var connection = new DatabaseConnectionProvider().GetConnection())
            {
                var target = CreatePrivateAccessor();
                var actual = target.PreValidateSqlExecution(connection, null);
                Assert.IsFalse(actual);

                actual = target.PreValidateSqlExecutionTx(connection.BeginTransaction(), null);
                Assert.IsFalse(actual);
            }
        }
Exemple #2
0
        public void TestPreValidateSqlExecution()
        {
            using (var connection = new DatabaseConnectionProvider().GetConnection())
            {
                var target = CreatePrivateAccessor();
                var actual = target.PreValidateSqlExecution(connection, "Some Text");
                Assert.IsTrue(actual);

                actual = target.PreValidateSqlExecutionTx(connection.BeginTransaction(), "Some Text");
                Assert.IsTrue(actual);
            }
        }