public void FindByFarmId_ReturnsEmpty_ForUnknownFarmId( [NotNull] PaddocksRepository sut) { // Arrange // Act IQueryable <IPaddock> actual = sut.FindByFarmId(Guid.Empty); // Assert Assert.AreEqual(0, actual.Count()); }
public void FindByFarmId_ReturnsPaddocks_ForKnownFarmId( [NotNull] Paddock one, [NotNull] Paddock two, Guid farmId, [NotNull] PaddocksRepository sut) { // Arrange one.FarmId = farmId; two.FarmId = farmId; sut.Save(one); sut.Save(two); // Act IQueryable <IPaddock> actual = sut.FindByFarmId(farmId); // Assert Assert.AreEqual(2, actual.Count()); }