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

            //Act
            var orderedPeople = BasicLinq.OrderByAgeDescending(people);

            //Assert
            orderedPeople.Should().BeEmpty();
        }
예제 #2
0
        public void OrderByAgeDescending_LotsOfPeople_ReturnsOrderedList()
        {
            // Arrange
            var people = TestData.LotsOfPeople;

            //Act
            var orderedPeople = BasicLinq.OrderByAgeDescending(people);

            //Assert
            orderedPeople.Should().BeInDescendingOrder(person => person.Age);
            orderedPeople.Should().HaveCount(people.Count);
            //Equivalent to ignores order
            orderedPeople.Should().BeEquivalentTo(people);
        }