Beispiel #1
0
        public void GetRecords_BadSortShouldReturnRecordsInOriginalOrder()
        {
            var controller = new FileDataController("test");

            controller.fileService = fileService;

            var result = controller.GetRecords("fake") as List <FileRecord>;

            result.Should().BeEquivalentTo(fileService.FileRecords);
        }
Beispiel #2
0
        public void GetRecords_BirthDateSortShouldReturnRecordsInOrderByBirthDateAsc()
        {
            var controller = new FileDataController("test");

            controller.fileService = fileService;

            var result = controller.GetRecords("birthdate") as List <FileRecord>;

            result.Should().BeInAscendingOrder(x => x.DateOfBirth);
        }
Beispiel #3
0
        public void GetRecords_NameSortShouldReturnRecordsInOrderByLastNameAsc()
        {
            var controller = new FileDataController("test");

            controller.fileService = fileService;

            var result = controller.GetRecords("lastname") as List <FileRecord>;

            result.Should().BeInAscendingOrder(x => x.LastName);
        }
Beispiel #4
0
        public void GetRecords_GenderSortShouldReturnRecordsInOrderByGenderAsc()
        {
            var controller = new FileDataController("test");

            controller.fileService = fileService;

            var result = controller.GetRecords("gender") as List <FileRecord>;

            result.Should().BeInAscendingOrder(x => x.Gender);
        }