コード例 #1
0
        public void GetOrderDirectionWithUserProfileSortModeIsNotEqualToCurrentSortModeReturnsDefaultDirection(UserProfileSortMode newSortMode, UserProfileSortMode currentSortMode, SortDirection expectedSortDirection)
        {
            // Arrange

            // Act
            var orderDirection = UrlHelperExtensions.GetOrderDirection(newSortMode, currentSortMode, SortDirection.Ascending);

            // Assert
            Assert.Equal(expectedSortDirection, orderDirection);
        }
コード例 #2
0
        public void GetOrderDirectionWithInstitutionSortModeAndCurrentSortModeIsNewSortModeReturnsOppositeDirection(InstitutionSortMode sortMode, SortDirection sortDirection, SortDirection expectedSortDirection)
        {
            // Arrange
            var currentSortMode = sortMode;

            // Act
            var orderDirection = UrlHelperExtensions.GetOrderDirection(sortMode, currentSortMode, sortDirection);

            // Assert
            Assert.Equal(expectedSortDirection, orderDirection);
        }