예제 #1
0
        public void ConventionalNotExists_ExistsInDb_ThrowsAssertionException()
        {
            Guid id = Guid.NewGuid();

            SetUpConventionalExistsTest(id, 1);

            var entity = new Entity {
                IdEntity = id
            };

            DbAssert.NotExists(entity);

            mocks.VerifyAll();
        }
예제 #2
0
        public void ConventionalNotExists_DoesNotExistInDb_SendsCountSqlToSqlProvider()
        {
            Guid id = Guid.NewGuid();

            SetUpConventionalExistsTest(id, 0);

            var entity = new Entity {
                IdEntity = id
            };

            DbAssert.NotExists(entity);

            mocks.VerifyAll();
        }
예제 #3
0
 public static void AssertNotExistsInDatabase(this object entity)
 {
     DbAssert.NotExists(entity);
 }