Ejemplo n.º 1
0
		protected void TestCtrlSpace(string fileHeader, string fileFooter, bool expected, Action<ICompletionItemList> constraint)
		{
			SetUpWithCode(fileHeader + fileFooter, fileHeader.Length);
			bool invoked = new XamlCodeCompletionBinding().CtrlSpace(textEditor);
			Assert.AreEqual(expected, invoked);
			ICompletionItemList list = textEditor.LastCompletionItemList;
			Assert.NotNull(list);
			constraint(list);
		}
Ejemplo n.º 2
0
        protected void TestCtrlSpace(string fileHeader, string fileFooter, bool expected, Action <ICompletionItemList> constraint)
        {
            SetUpWithCode(fileHeader + fileFooter, fileHeader.Length);
            bool invoked = new XamlCodeCompletionBinding().CtrlSpace(textEditor);

            Assert.AreEqual(expected, invoked);
            ICompletionItemList list = textEditor.LastCompletionItemList;

            Assert.NotNull(list);
            constraint(list);
        }
Ejemplo n.º 3
0
        protected void TestKeyPress(string fileHeader, string fileFooter, char keyPressed, CodeCompletionKeyPressResult keyPressResult, Action <ICompletionItemList> constraint)
        {
            SetUpWithCode(fileHeader + fileFooter, fileHeader.Length);
            CodeCompletionKeyPressResult result = new XamlCodeCompletionBinding().HandleKeyPress(textEditor, keyPressed);

            Assert.AreEqual(keyPressResult, result);

            ICompletionItemList list = this.textEditor.LastCompletionItemList;

            constraint(list);
        }
Ejemplo n.º 4
0
        protected void TestKeyPress(string fileHeader, string fileFooter, char keyPressed, CodeCompletionKeyPressResult keyPressResult, Action <ICompletionItemList> constraint)
        {
            this.textEditor.Document.Text = fileHeader + fileFooter;
            this.textEditor.Caret.Offset  = fileHeader.Length;
            this.textEditor.CreateParseInformation();

            CodeCompletionKeyPressResult result = new XamlCodeCompletionBinding().HandleKeyPress(textEditor, keyPressed);

            Assert.AreEqual(keyPressResult, result);

            ICompletionItemList list = this.textEditor.LastCompletionItemList;

            constraint(list);
        }
Ejemplo n.º 5
0
        protected void TestCtrlSpace(string fileHeader, string fileFooter, bool expected, Action <ICompletionItemList> constraint)
        {
            this.textEditor.Document.Text = fileHeader + fileFooter;
            this.textEditor.Caret.Offset  = fileHeader.Length;
            this.textEditor.CreateParseInformation();

            bool invoked = new XamlCodeCompletionBinding().CtrlSpace(textEditor);

            Assert.AreEqual(expected, invoked);

            ICompletionItemList list = this.textEditor.LastCompletionItemList;

            constraint(list);
        }
		protected void TestKeyPress(string fileHeader, string fileFooter, char keyPressed, CodeCompletionKeyPressResult keyPressResult, Action<ICompletionItemList> constraint)
		{
			this.textEditor.Document.Text = fileHeader + fileFooter;
			this.textEditor.Caret.Offset = fileHeader.Length;
			this.textEditor.CreateParseInformation();
			
			CodeCompletionKeyPressResult result = new XamlCodeCompletionBinding().HandleKeyPress(textEditor, keyPressed);
			
			Assert.AreEqual(keyPressResult, result);
			
			ICompletionItemList list = this.textEditor.LastCompletionItemList;
			
			constraint(list);
		}
		protected void TestCtrlSpace(string fileHeader, string fileFooter, bool expected, Action<ICompletionItemList> constraint)
		{
			this.textEditor.Document.Text = fileHeader + fileFooter;
			this.textEditor.Caret.Offset = fileHeader.Length;
			this.textEditor.CreateParseInformation();
			
			bool invoked = new XamlCodeCompletionBinding().CtrlSpace(textEditor);
			
			Assert.AreEqual(expected, invoked);
			
			ICompletionItemList list = this.textEditor.LastCompletionItemList;
			
			constraint(list);
		}
		protected void TestKeyPress(string fileHeader, string fileFooter, char keyPressed, CodeCompletionKeyPressResult keyPressResult, Action<ICompletionItemList> constraint)
		{
			SetUpWithCode(fileHeader + fileFooter, fileHeader.Length);
			CodeCompletionKeyPressResult result = new XamlCodeCompletionBinding().HandleKeyPress(textEditor, keyPressed);
			
			Assert.AreEqual(keyPressResult, result);
			
			ICompletionItemList list = this.textEditor.LastCompletionItemList;
			
			constraint(list);
		}