예제 #1
0
        public static void Get_Returns_WithoutJoinsAndNotIEntity()
        {
            var repo   = new NewRepository(Factory);
            New result = null;

            Assert.DoesNotThrow(() => result = repo.Get(new New {
                Key = 1
            }, Connection));
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Key, Is.EqualTo(1));
        }
예제 #2
0
        public static void Get_Returns_WithoutJoinsAndUnitOfWorkAndNotIEntity()
        {
            var repo   = new NewRepository(Factory);
            New result = null;

            using (var uow = Connection.UnitOfWork(IsolationLevel.Serializable))
            {
                Assert.DoesNotThrow(() => result = repo.Get(new New {
                    Key = 1
                }, uow));
            }
            Assert.That(result, Is.Not.Null);
            Assert.That(result.Key, Is.EqualTo(1));
        }