예제 #1
0
        public void GetFirstNamesOfPeople_SinglePerson_ReturnsListWithSingleName()
        {
            // Arrange
            var people = TestData.AbbySmith;

            //Act
            var names = BasicLinq.GetFirstNamesOfPeople(people);

            //Assert
            names.Should().ContainSingle().Subject.Should().Be("Abby");
        }
예제 #2
0
        public void GetFirstNamesOfPeople_EmptyList_ReturnsEmptyList()
        {
            // Arrange
            var people = TestData.NoPeople;

            //Act
            var names = BasicLinq.GetFirstNamesOfPeople(people);

            //Assert
            names.Should().BeEmpty();
        }
예제 #3
0
        public void GetFirstNamesOfPeople_LotsOfPeople_ReturnsListWithAllNames()
        {
            // Arrange
            var people = TestData.LotsOfPeople;

            //Act
            var names = BasicLinq.GetFirstNamesOfPeople(people);

            //Assert
            names.Should().BeEquivalentTo(new List <string>
            {
                "Abby",
                "Bob",
                "Charlie",
                "Dani",
                "Ellie",
                "Felicity",
                "George",
                "Hannah",
                "Ismail",
                "Jake",
                "Lenny"
            });
        }