public void SingleOrDefault_PredicateUsedToFindMoreOneBirth_ThrowsInvalidOperationException() { var randomBirthId = PreDefinedData.GetRandomBirthId(); Assert.That(() => UnitOfWork.Births.SingleOrDefault(p => p.Id != randomBirthId), Throws.InvalidOperationException); }
public void SingleOrDefault_PredicateUsedToFindOneBirth_ReturnsOneBirth() { var randomBirthId = PreDefinedData.GetRandomBirthId(); var result = UnitOfWork.Births.SingleOrDefault(p => p.Id == randomBirthId); Assert.That(result, Is.Not.Null); }
public void Find_PredicateUsedToFindOneBirth_ReturnsCollection() { var randomBirthId = PreDefinedData.GetRandomBirthId(); var result = UnitOfWork.Births.Find(p => p.Id == randomBirthId); Assert.That(result.Count, Is.EqualTo(1)); Assert.That(result.First().Id == randomBirthId); }
public void Get_ValidBirthById_ReturnsSingleBirth() { var randomBirthId = PreDefinedData.GetRandomBirthId(); var result = UnitOfWork.Births.Get(randomBirthId); Assert.That(result, Is.Not.Null); Assert.That(result.Id, Is.EqualTo(randomBirthId)); }