Exemplo n.º 1
0
        public async Task TestSuggestions()
        {
            var empty = await _node.ListSuggestions(_contextBuilder.Build(""), new SuggestionsBuilder("", 0));

            empty.List.Should().BeEquivalentTo(new List <Suggestion.Suggestion> {
                new Suggestion.Suggestion(StringRange.At(0), "foo")
            });

            var foo = await _node.ListSuggestions(_contextBuilder.Build("foo"), new SuggestionsBuilder("foo", 0));

            foo.IsEmpty().Should().Be(true);

            var food = await _node.ListSuggestions(_contextBuilder.Build("food"), new SuggestionsBuilder("food", 0));

            food.IsEmpty().Should().Be(true);

            var b = await _node.ListSuggestions(_contextBuilder.Build("b"), new SuggestionsBuilder("b", 0));

            b.IsEmpty().Should().Be(true);
        }
Exemplo n.º 2
0
        public async Task TestSuggestions()
        {
            var result = await _node.ListSuggestions(_contextBuilder.Build(""), new SuggestionsBuilder("", 0));

            result.IsEmpty().Should().Be(true);
        }
Exemplo n.º 3
0
 public void testGetArgument_nonexistent()
 {
     _builder.Build("").Invoking(b => b.GetArgument <object>("foo"))
     .Should().Throw <InvalidOperationException>();
 }