Esempio n. 1
0
        public static void GetKeyAsync_Returns_WithoutJoinsWithoutIEntity()
        {
            var repo   = new NewRepository(Factory);
            New result = null;

            Assert.DoesNotThrowAsync(async() => result = await repo.GetByKeyAsync(1, Connection));
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Key, Is.EqualTo(1));
        }
Esempio n. 2
0
        public static void GetKeyAsync_Returns_WithoutJoinsWithUnitOrWorkWithoutIEnity()
        {
            var repo   = new NewRepository(Factory);
            New result = null;

            using (var uow = Connection.UnitOfWork(IsolationLevel.Serializable))
            {
                Assert.DoesNotThrowAsync(async() => result = await repo.GetByKeyAsync(1, uow));
            }
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Key, Is.EqualTo(1));
        }