public void TestKeyPress_GridButNoColumns() { TextBoxPoker tb = new TextBoxPoker(); DataGrid dg = new DataGrid(); tb.SetDataGrid(dg); tb.DoOnKeyPress(new KeyPressEventArgs('a')); }
public void TestKeyPress() { TextBoxPoker tb = new TextBoxPoker(); DataGridMock dg = new DataGridMock(); tb.SetDataGrid(dg); Assert.IsTrue(tb.IsInEditOrNavigateMode, "1"); tb.DoOnKeyPress(new KeyPressEventArgs('a')); Assert.IsFalse(tb.IsInEditOrNavigateMode, "2"); Assert.AreEqual("", tb.Text, "3"); tb.ReadOnly = true; tb.IsInEditOrNavigateMode = true; tb.DoOnKeyPress(new KeyPressEventArgs('a')); Assert.IsTrue(tb.IsInEditOrNavigateMode, "4"); Assert.AreEqual("", tb.Text, "5"); }
public void TestKeyPress_NoGrid () { TextBoxPoker tb = new TextBoxPoker (); tb.DoOnKeyPress (new KeyPressEventArgs ('a')); }
public void TestKeyPress () { TextBoxPoker tb = new TextBoxPoker (); DataGridMock dg = new DataGridMock (); tb.SetDataGrid (dg); Assert.IsTrue (tb.IsInEditOrNavigateMode, "1"); tb.DoOnKeyPress (new KeyPressEventArgs ('a')); Assert.IsFalse (tb.IsInEditOrNavigateMode, "2"); Assert.AreEqual ("", tb.Text, "3"); tb.ReadOnly = true; tb.IsInEditOrNavigateMode = true; tb.DoOnKeyPress (new KeyPressEventArgs ('a')); Assert.IsTrue (tb.IsInEditOrNavigateMode, "4"); Assert.AreEqual ("", tb.Text, "5"); }
public void TestKeyPress_GridButNoColumns () { TextBoxPoker tb = new TextBoxPoker (); DataGrid dg = new DataGrid (); tb.SetDataGrid (dg); tb.DoOnKeyPress (new KeyPressEventArgs ('a')); }
public void TestKeyPress_NoGrid() { TextBoxPoker tb = new TextBoxPoker(); tb.DoOnKeyPress(new KeyPressEventArgs('a')); }