public void TheFindCommandsByGestureMethod(Key key, ModifierKeys modifierKeys, bool expectedToBeAvailable)
        {
            var commandManager = new CommandManager();

            commandManager.CreateCommand("CtrlA", new InputGesture(Key.A, ModifierKeys.Control));

            var inputGesture = new InputGesture(key, modifierKeys);
            var existingCommands = commandManager.FindCommandsByGesture(inputGesture);

            Assert.AreEqual(expectedToBeAvailable, existingCommands.Any());
        }
Ejemplo n.º 2
0
        public void TheFindCommandsByGestureMethod(Key key, ModifierKeys modifierKeys, bool expectedToBeAvailable)
        {
            var commandManager = new CommandManager();

            commandManager.CreateCommand("CtrlA", new InputGesture(Key.A, ModifierKeys.Control));

            var inputGesture     = new InputGesture(key, modifierKeys);
            var existingCommands = commandManager.FindCommandsByGesture(inputGesture);

            Assert.AreEqual(expectedToBeAvailable, existingCommands.Any());
        }