public void OrderCategoriesByDescription()
        {
            // Arrange
            var categories = new List <Category>();

            fixture.AddManyTo(categories);
            mocker.GetMock <ICategoryRepository>().Setup(c => c.GetAll()).Returns(categories.AsAsyncQueryable());
            sut = mocker.Create <GetAllCategoriesQuery>();
            // Act
            var results        = (sut.Execute().Result).ToList();
            var orderedResults = results.OrderBy(r => r.Description);

            Assert.Equal(orderedResults, results);
        }
        public GetAllCategoriesQueryShould()
        {
            fixture = new Fixture();
            fixture.Customize(new AutoMoqCustomization());
            fixture.Customize <Category>(m => m.Without(c => c.PlannerItems));
            category = new Category
            {
                ID          = ID,
                Description = DESCRIPTION,
                Colour      = COLOUR
            };
            mocker = new AutoMoqer();
            var categoryQueryableMock = new List <Category> {
                category
            }.AsAsyncQueryable();
            var categoryRepository = mocker
                                     .GetMock <ICategoryRepository>()
                                     .Setup(r => r.GetAll())
                                     .Returns(categoryQueryableMock);

            sut = mocker.Create <GetAllCategoriesQuery>();
        }