Exemple #1
0
        public void RecordsController_GetSortByGender()
        {
            // Arrange
            RecordsController recordsController = new RecordsController();

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

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