Exemple #1
0
        public async Task DoNotSuggestTimeEntriesWithArchivedProjectsWhenSearchingByDescription()
        {
            var interactor = new GetTimeEntriesAutocompleteSuggestions(dataSource, new[] { "48" });

            var suggestions = await interactor.Execute();

            suggestions.Should().HaveCount(0);
        }
Exemple #2
0
        public async Task SuggestsTimeEntriesWithoutProjects()
        {
            var interactor = new GetTimeEntriesAutocompleteSuggestions(dataSource, new[] { "45" });

            var suggestions = await interactor.Execute();

            suggestions.Should().HaveCount(1);
        }
Exemple #3
0
        public async Task DoNotSuggestTimeEntriesWhichReferenceArchivedProjects()
        {
            var interactor = new GetTimeEntriesAutocompleteSuggestions(dataSource, new[] { "38" });

            var suggestions = await interactor.Execute();

            suggestions.Should().HaveCount(0);
        }
Exemple #4
0
        public async Task DoNotSuggestDeletedTimeEntriesAmongFilteredTimeEntries()
        {
            var interactor = new GetTimeEntriesAutocompleteSuggestions(dataSource, new[] { "49" });

            var suggestions = await interactor.Execute();

            suggestions.Should().HaveCount(0)
            .And.AllBeOfType <TimeEntrySuggestion>();
        }
Exemple #5
0
        public async Task OnlyDisplaysResultsTheHaveHasAtLeastOneMatchOnEveryWordTyped()
        {
            var interactor = new GetTimeEntriesAutocompleteSuggestions(dataSource, new[] { "10", "30", "4" });

            var suggestions = await interactor.Execute();

            suggestions.Should().HaveCount(1)
            .And.AllBeOfType <TimeEntrySuggestion>();
        }
Exemple #6
0
        public async Task SearchesTheClientsName()
        {
            var interactor = new GetTimeEntriesAutocompleteSuggestions(dataSource, new[] { "10" });

            var suggestions = await interactor.Execute();

            suggestions.Should().HaveCount(1)
            .And.AllBeOfType <TimeEntrySuggestion>();
        }
Exemple #7
0
        public async Task SearchesTheTaskName()
        {
            var interactor = new GetTimeEntriesAutocompleteSuggestions(dataSource, new[] { "25" });

            var suggestions = await interactor.Execute().Flatten().ToList();

            suggestions.Should().HaveCount(1)
            .And.AllBeOfType <TimeEntrySuggestion>();
            var suggestion = (TimeEntrySuggestion)suggestions.First();

            suggestion.TaskId.Should().Be(25);
            suggestion.ProjectId.Should().Be(36);
            suggestion.Description.Should().Be("46");
        }