Ejemplo n.º 1
0
 public void Test_RefreshNotEmptyAndSelected()
 {
     stringTextContext = new StringTextContext("refresh");
     stringTextContext.SetSelection(1,3);
     Assert.AreEqual("refresh", stringTextContext.Data, "Initial Data is not equal to argument string!");
     Assert.AreEqual(1, stringTextContext.SelectionStart, "SelectionStart not 1!");
     Assert.AreEqual(3, stringTextContext.SelectionEnd, "SelectionEnd not 3!");
     Assert.AreEqual("ef", stringTextContext.SelectedText, "Initial SelectedText not empty!");
     stringTextContext.Refresh();
     Assert.AreEqual("refresh", stringTextContext.Data, "Initial Data is not empty after Refresh!");
     Assert.AreEqual(1, stringTextContext.SelectionStart, "SelectionStart not 1 after Refresh!");
     Assert.AreEqual(3, stringTextContext.SelectionEnd, "SelectionEnd not 3 after Refresh!");
     Assert.AreEqual("ef", stringTextContext.SelectedText, "Initial SelectedText not empty after Refresh!");
 }
Ejemplo n.º 2
0
 public void Test_RefreshNotEmpty()
 {
     stringTextContext = new StringTextContext("refresh");
     Assert.AreEqual("refresh", stringTextContext.Data, "Initial Data is not equal to argument string!");
     Assert.AreEqual(0, stringTextContext.SelectionStart, "Initial SelectionStart not 0!");
     Assert.AreEqual(0, stringTextContext.SelectionEnd, "Initial SelectionEnd not 0!");
     Assert.AreEqual("", stringTextContext.SelectedText, "Initial SelectedText not empty!");
     stringTextContext.Refresh();
     Assert.AreEqual("refresh", stringTextContext.Data, "Initial Data is not equal to argumetn string after Refresh!");
     Assert.AreEqual(0, stringTextContext.SelectionStart, "Initial SelectionStart not 0 after Refresh!");
     Assert.AreEqual(0, stringTextContext.SelectionEnd, "Initial SelectionEnd not 0 after Refresh!");
     Assert.AreEqual("", stringTextContext.SelectedText, "Initial SelectedText not empty after Refresh!");
 }