Beispiel #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();
        }
Beispiel #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();
        }
Beispiel #3
0
 public static void AssertNotExistsInDatabase(this object entity)
 {
     DbAssert.NotExists(entity);
 }