public async Task ReturnsNotFoundGivenNoRemainingItems()
        {
            var repo    = new Mock <IRepository>();
            var service = new ToDoItemSearchService(repo.Object);

            repo.Setup(r => r.ListAsync(It.IsAny <ISpecification <ToDoItem> >()))
            .ReturnsAsync(new List <ToDoItem>());

            var result = await service.GetNextIncompleteItemAsync();

            Assert.Equal(Ardalis.Result.ResultStatus.NotFound, result.Status);
        }
        public async Task ReturnsFirstItemFromList()
        {
            var repo      = new Mock <IRepository>();
            var service   = new ToDoItemSearchService(repo.Object);
            var testItems = GetTestItems();

            repo.Setup(r => r.ListAsync(It.IsAny <ISpecification <ToDoItem> >()))
            .ReturnsAsync(testItems);

            var result = await service.GetNextIncompleteItemAsync();

            Assert.Equal(testItems.First(), result.Value);
        }