Beispiel #1
0
        public void FindOldestPerson_LotsOfPeople_ReturnsFelicityPlott()
        {
            // Arrange
            var people = TestData.LotsOfPeople;

            //Act
            var oldestPerson = BasicLinq.FindOldestPerson(people);

            //Assert
            oldestPerson.Should().BeEquivalentTo(new Person("Felicity", "Plott", new List <string>(), new DateTime(1800, 4, 5), 99, Colour.Blue, "London"));
        }
Beispiel #2
0
        public void FindOldestPerson_EmptyList_ReturnsNull()
        {
            // Arrange
            var people = TestData.NoPeople;

            //Act
            var oldestPerson = BasicLinq.FindOldestPerson(people);

            //Assert
            oldestPerson.Should().BeNull();
        }
        public void FindOldestPerson_AllThePeople_ReturnsPerson()
        {
            // Arrange
            var people = TestData.AllThePeople;

            //Act
            var oldestPerson = BasicLinq.FindOldestPerson(people);

            //Assert
            oldestPerson.Should().NotBeNull();
        }
Beispiel #4
0
        public void FindOldestPerson_AbbySmith_ReturnsAbbySmith()
        {
            // Arrange
            var people = TestData.AbbySmith;

            //Act
            var oldestPerson = BasicLinq.FindOldestPerson(people);

            //Assert
            oldestPerson.Should().BeEquivalentTo(new Person("Abby", "Smith", new List <string> {
                "Olivia"
            }, new DateTime(1990, 1, 5), 29, Colour.Blue, "Leeds"));
        }