Example #1
0
        public void expand_replacement()
        {
            var suggestion = new Suggestion.Suggestion(StringRange.Between(6, 11), "strangers");

            suggestion.Expand("Hello world!", StringRange.Between(0, 12)).Should().BeEquivalentTo(new Suggestion.Suggestion(StringRange.Between(0, 12), "Hello strangers!"));
        }
Example #2
0
        public void expand_both()
        {
            var suggestion = new Suggestion.Suggestion(StringRange.At(11), "minecraft:");

            suggestion.Expand("give Steve fish_block", StringRange.Between(5, 21)).Should().BeEquivalentTo(new Suggestion.Suggestion(StringRange.Between(5, 21), "Steve minecraft:fish_block"));
        }
Example #3
0
        public void expand_left()
        {
            var suggestion = new Suggestion.Suggestion(StringRange.At(1), "oo");

            suggestion.Expand("f", StringRange.Between(0, 1)).Should().BeEquivalentTo(new Suggestion.Suggestion(StringRange.Between(0, 1), "foo"));
        }
Example #4
0
        public void expand_right()
        {
            var suggestion = new Suggestion.Suggestion(StringRange.At(0), "minecraft:");

            suggestion.Expand("fish", StringRange.Between(0, 4)).Should().BeEquivalentTo(new Suggestion.Suggestion(StringRange.Between(0, 4), "minecraft:fish"));
        }
Example #5
0
        public void expand_unchanged()
        {
            var suggestion = new Suggestion.Suggestion(StringRange.At(1), "oo");

            suggestion.Expand("f", StringRange.At(1)).Should().BeEquivalentTo(suggestion);
        }