示例#1
0
        public void RecordsController_GetSortByBirthdate()
        {
            // Arrange
            RecordsController recordsController = new RecordsController();

            // Act
            ActionResult <IEnumerable <Person> > results = recordsController.GetSortByBirthdate();
            List <Person> persons = (List <Person>)results.Value;

            // Assert
            Assert.IsNotNull(persons);
            Assert.IsTrue(persons.Count > 0);
            Assert.IsTrue(persons[0].DateOfBirth <= persons[persons.Count - 1].DateOfBirth);
        }