public void TestKeyEquality() { Key key1 = new Key("C-a"); Key key2 = new Key("C-f10"); Key key3 = new Key("C-f10"); Assert.AreNotEqual(key1, key2); Assert.AreEqual(key2, key3); }
public void TestKeyConstructor() { Key key = new Key("A", false, true, false); Assert.AreEqual("A", key.KeyCode); Assert.AreEqual(false, key.Shift); Assert.AreEqual(true, key.Control); Assert.AreEqual(false, key.Alt); Key key2 = new Key("C-a"); Assert.AreEqual(key, key2); }
public KeyStrokeEventArgs(Key key) { _key = key; }
public void TestKeyToString() { Key key = new Key("C-a"); Assert.AreEqual("C-a", key.ToString()); }