public void ToStringOutputsKeyNameOnlyWhenModifierNoneIsSet() { var hotKey = new HotKey(null); hotKey.Modifiers = ModifierKeys.None; hotKey.Key = System.Windows.Forms.Keys.None; var stringValue = hotKey.ToString(); Assert.AreEqual("None", stringValue); }
public void ToStringOutputsModifierAndKeyNameWhenOneModifierIsSet() { var hotKey = new HotKey(null); hotKey.Modifiers = ModifierKeys.Control; hotKey.Key = System.Windows.Forms.Keys.A; var stringValue = hotKey.ToString(); Assert.AreEqual("Control + A", stringValue); }
public void ToStringOutputsAllSetModifiersAndKeyNameWhenMultipleModifiersAreSet() { var hotKey = new HotKey(null); hotKey.Modifiers = ModifierKeys.Control | ModifierKeys.Shift | ModifierKeys.Windows; hotKey.Key = System.Windows.Forms.Keys.A; var stringValue = hotKey.ToString(); Assert.AreEqual("Control + Shift + Windows + A", stringValue); }