Example #1
0
        public void FindById_ReturnsMiller_ForKnownId(
            [NotNull] IMiller expected,
            [NotNull] MillersRepository sut)
        {
            // Arrange
            sut.Save(expected);

            // Act
            IMiller actual = sut.FindById(expected.Id);

            // Assert
            Assert.AreEqual(expected,
                            actual);
        }
Example #2
0
        public void SearchByMillerName_ReturnsMatchingFarms_ForSearchText(
            [NotNull] IMiller expected,
            [NotNull] MillersRepository sut)
        {
            // Arrange
            expected.Name = "Name";
            sut.Save(expected);

            // Act
            IQueryable <IMiller> actual = sut.SearchByMillerName("Na");

            // Assert
            Assert.AreEqual(expected,
                            actual.First());
        }