Exemplo n.º 1
0
            public void ParsesWordOffsetAndType(
                string text,
                int caretPosition,
                string expectedPrefix,
                int expectedOffset)
            {
                var token = AutoCompleteAdvisor.ParseAutoCompletionToken(text, caretPosition, ":");

                Assert.AreEqual(expectedPrefix, token.SearchSearchPrefix);
                Assert.AreEqual(expectedOffset, token.Offset);
            }
Exemplo n.º 2
0
 public void ThrowsExceptionWhenCaretIndexIsOutOfRangeOfText(string text, int caretIndex)
 {
     Assert.Throws <ArgumentOutOfRangeException>(
         () => AutoCompleteAdvisor.ParseAutoCompletionToken(text, caretIndex, ":"));
 }
Exemplo n.º 3
0
 public void ReturnsNullForTextWithoutAnyTriggerCharactersMatchingCaretIndex(string text, int caretPosition)
 {
     Assert.Null(AutoCompleteAdvisor.ParseAutoCompletionToken(text, caretPosition, ":"));
 }