예제 #1
0
        public void SupressTaskSwitchTest()
        {
            var view       = new Mock <IMainGameView>();
            var controller = new MainGameController(view.Object);

            controller.IsShouldSupressKey(Keys.Tab, true, true).ShouldBe(true);
            controller.IsShouldSupressKey(Keys.Tab, true, false).ShouldBe(true);
            controller.IsShouldSupressKey(Keys.Tab, false, true).ShouldBe(false);
            controller.IsShouldSupressKey(Keys.Tab, false, false).ShouldBe(false);
        }
예제 #2
0
        public void SupressWindowsKeyTest()
        {
            var view       = new Mock <IMainGameView>();
            var controller = new MainGameController(view.Object);

            controller.IsShouldSupressKey(Keys.LWin, true, true).ShouldBe(true);
            controller.IsShouldSupressKey(Keys.LWin, true, false).ShouldBe(true);
            controller.IsShouldSupressKey(Keys.LWin, false, true).ShouldBe(true);
            controller.IsShouldSupressKey(Keys.LWin, false, false).ShouldBe(true);

            controller.IsShouldSupressKey(Keys.RWin, true, true).ShouldBe(true);
            controller.IsShouldSupressKey(Keys.RWin, true, false).ShouldBe(true);
            controller.IsShouldSupressKey(Keys.RWin, false, true).ShouldBe(true);
            controller.IsShouldSupressKey(Keys.RWin, false, false).ShouldBe(true);
        }