コード例 #1
0
        public static void CountAsync_Returns_CountWithOwnSession()
        {
            var repo   = new BraveRepository(Factory);
            var result = 0;

            Assert.DoesNotThrowAsync(async() => result = await repo.CountAsync <ITestSession>());
            Assert.That(result, Is.Positive);
        }
コード例 #2
0
        public static void CountAsync_Returns_Count()
        {
            var repo   = new BraveRepository(Factory);
            var result = 0;

            Assert.DoesNotThrowAsync(async() => result = await repo.CountAsync(Connection));
            Assert.That(result, Is.Positive);
        }
コード例 #3
0
        public static void CountAsync_Returns_CountUnitOfWork()
        {
            var repo   = new BraveRepository(Factory);
            var result = 0;

            using (var uow = Connection.UnitOfWork(IsolationLevel.Serializable))
            {
                Assert.DoesNotThrowAsync(async() => result = await repo.CountAsync(uow));
                Assert.That(result, Is.Positive);
            }
        }