Exemplo n.º 1
0
        public void ConventionalExists_DoesNotExistInDb_ThrowsAssertionException()
        {
            Guid id = Guid.NewGuid();

            SetUpConventionalExistsTest(id, 0);

            var entity = new Entity {
                IdEntity = id
            };

            DbAssert.Exists(entity);

            mocks.VerifyAll();
        }
Exemplo n.º 2
0
        public void ConventionalExists_ExistsInDb_SendsCountSqlToSqlProvider()
        {
            Guid id = Guid.NewGuid();

            SetUpConventionalExistsTest(id, 1);

            var entity = new Entity {
                IdEntity = id
            };

            DbAssert.Exists(entity);

            mocks.VerifyAll();
        }
Exemplo n.º 3
0
 public static void AssertExistsInDatabase(this object entity)
 {
     DbAssert.Exists(entity);
 }