public void SortProjectEntries_ShouldSortByDefaultSort_WhenWrongStringIsPassed()
        {
            var sut     = new ProjectEntryHandler(_context, _projectEntryRepository);
            var entries = _context.ProjectEntries.ToList();

            var expected = entries.OrderByDescending(entry => entry.DateCreated);
            var result   = sut.SortEntries("brabble", entries);

            Assert.That(result, Is.EqualTo(expected));
        }
        public void SortProjectEntries_ShouldSortByDescendingHours_WhenPassedDescendingHoursString()
        {
            var sut     = new ProjectEntryHandler(_context, _projectEntryRepository);
            var entries = _context.ProjectEntries.ToList();

            var expected = entries.OrderByDescending(entry => entry.Hours);
            var result   = sut.SortEntries("hours_desc", entries);

            Assert.That(result, Is.EqualTo(expected));
        }
        public void SortProjectEntries_ShouldSortByDateCreated_WhenPassedDateString()
        {
            var sut     = new ProjectEntryHandler(_context, _projectEntryRepository);
            var entries = _context.ProjectEntries.ToList();

            var expected = entries.OrderBy(entry => entry.DateCreated);
            var result   = sut.SortEntries("date", entries);

            Assert.That(result, Is.EqualTo(expected));
        }
        public void SortProjectEntries_ShouldSortByCategoryName_WhenPassedCategoryString()
        {
            var sut     = new ProjectEntryHandler(_context, _projectEntryRepository);
            var entries = _context.ProjectEntries.ToList();

            var expected = entries.OrderBy(entry => entry.SREDCategory.CategoryName);
            var result   = sut.SortEntries("category", entries);

            Assert.That(result, Is.EqualTo(expected));
        }
        public void SortProjectEntries_ShouldSortByChangeListNo_WhenProvidedChangeListNoString()
        {
            var sut     = new ProjectEntryHandler(_context, _projectEntryRepository);
            var entries = _context.ProjectEntries.ToList();

            var expected = entries.OrderBy(entry => entry.ChangeListNo);
            var result   = sut.SortEntries("changeListNo", entries);

            Assert.That(result, Is.EqualTo(expected));
        }