Ejemplo n.º 1
0
        public static void GetAllAsyncITestSession_Returns_CorrectAmountCreatingASessionItself()
        {
            var repo = new BraveRepository(Factory);
            IEnumerable <Brave> results = null;

            Assert.DoesNotThrowAsync(async() => results = await repo.GetAllAsync <ITestSession>());
            Assert.That(results, Is.Not.Null);
            Assert.That(results, Is.Not.Empty);
            results.Should().HaveCount(x => x > 0);
        }
Ejemplo n.º 2
0
        public static void GetAll_Returns_CorrectAmountWithUnitOfWork()
        {
            var repo = new BraveRepository(Factory);
            IEnumerable <Brave> results = null;

            using (var uow = Connection.UnitOfWork(IsolationLevel.Serializable))
            {
                Assert.DoesNotThrowAsync(async() => results = await repo.GetAllAsync(uow));
            }
            Assert.That(results, Is.Not.Null);
            Assert.That(results, Is.Not.Empty);
            results.Should().HaveCount(x => x > 0);
        }