コード例 #1
0
        public void Given_A_Null_Query_Should_ArgumentException()
        {
            // Arrange
            // Act
            Func <Task <SearchSuggestionsPhrases> > act = () => _sut.SuggestedPhrases(null);

            // Assert
            act.Should().Throw <ArgumentException>();
        }
コード例 #2
0
        public async Task Given_A_DomainUrl__Should_Retrieve_Search_Results(string domainUrl, string query)
        {
            // Arrange
            var sut = new WikiSearchSuggestions(domainUrl);

            // Act
            var result = await sut.SuggestedPhrases(query);

            // Assert
            result.Should().NotBeNull();
        }