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)); }
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)); }