Example #1
0
        public void CombinePeople_EmptyLists_ReturnsEmptyList()
        {
            // Arrange
            var firstList  = TestData.NoPeople;
            var secondList = TestData.NoPeople;

            //Act
            var combinedPeople = IntermediateLinq.CombinePeople(firstList, secondList);

            //Assert
            combinedPeople.Should().BeEmpty();
        }
Example #2
0
        public void CombinePeople_LotsOfPeopleAndEmptyList_ReturnsLotsOfPeople()
        {
            // Arrange
            var firstList  = TestData.LotsOfPeople;
            var secondList = TestData.NoPeople;

            //Act
            var combinedPeople = IntermediateLinq.CombinePeople(firstList, secondList);

            //Assert
            combinedPeople.Should().HaveCount(TestData.LotsOfPeople.Count);
            combinedPeople.Should().BeEquivalentTo(TestData.LotsOfPeople);
        }
Example #3
0
        public void CombinePeople_AbbySmithAndLotsOfPeople_ReturnsCombinedList()
        {
            // Arrange
            var firstList         = TestData.AbbySmith;
            var secondList        = TestData.LotsOfPeople;
            var combinedListCount = TestData.AbbySmith.Count + TestData.LotsOfPeople.Count;

            //Act
            var combinedPeople = IntermediateLinq.CombinePeople(firstList, secondList);

            //Assert
            combinedPeople.Should().HaveCount(combinedListCount);
            combinedPeople.Should().Contain(TestData.AbbySmith.FirstOrDefault());
        }