コード例 #1
0
        public void CustomExample1_ShouldReturnEmptyList()
        {
            var repository = new List <string>
            {
                "abcde", "abcdef", "abcdi", "abcdj", "abcdfa"
            };

            var result = ThreeKeywordsSuggestionProblem.ThreeKeywordSuggestions(0, repository, "abcde");

            var expectedResult = new List <List <string> >
            {
                new List <string> {
                    "abcde", "abcdef", "abcdfa"
                },
                new List <string> {
                    "abcde", "abcdef", "abcdfa"
                },
                new List <string> {
                    "abcde", "abcdef", "abcdfa"
                },
                new List <string> {
                    "abcde", "abcdef"
                }
            };

            result.Should().BeEquivalentTo(expectedResult);
        }
コード例 #2
0
        public void FirstExample_ShouldReturnEmptyList()
        {
            var result = ThreeKeywordsSuggestionProblem.ThreeKeywordSuggestions(0, GetValidKeywordsList(), "mouse");

            var expectedResult = new List <List <string> >
            {
                new List <string> {
                    "mobile", "moneypot", "monitor"
                },
                new List <string> {
                    "mouse", "mousepad"
                },
                new List <string> {
                    "mouse", "mousepad"
                },
                new List <string> {
                    "mouse", "mousepad"
                }
            };

            result.Should().BeEquivalentTo(expectedResult);
        }
コード例 #3
0
        public void NonExstentQuery_ShouldReturnEmptyList()
        {
            var result = ThreeKeywordsSuggestionProblem.ThreeKeywordSuggestions(0, GetValidKeywordsList(), "abc");

            result.Should().BeEmpty();
        }
コード例 #4
0
        public void OneLetterQuery_ShouldReturnEmptyList()
        {
            var result = ThreeKeywordsSuggestionProblem.ThreeKeywordSuggestions(0, GetValidKeywordsList(), "m");

            result.Should().BeEmpty();
        }
コード例 #5
0
        public void RepositoryNull_ShouldReturnEmptyList()
        {
            var result = ThreeKeywordsSuggestionProblem.ThreeKeywordSuggestions(0, null, "mouse");

            result.Should().BeEmpty();
        }
コード例 #6
0
        public void QueryNull_ShouldReturnEmptyList()
        {
            var result = ThreeKeywordsSuggestionProblem.ThreeKeywordSuggestions(0, GetValidKeywordsList(), null);

            result.Should().BeEmpty();
        }