public void record_sets_history_empty_when_no_items()
        {
            var map = new HOTASButton();

            map.Record();
            map.Cancel();
            Assert.Empty(map.ActionCatalogItem.Actions);
        }
        public void cancel_sets_keyboard_state_false()
        {
            Keyboard.IsKeySuppressionActive = false;
            var map = new HOTASButton();

            map.Record();
            map.Cancel();
            Assert.False(Keyboard.IsKeySuppressionActive);
        }
        public void record_sets_history_with_one_item()
        {
            var map  = new HOTASButton();
            var item = new ButtonAction()
            {
                ScanCode = 1, IsExtended = true, TimeInMilliseconds = 1
            };

            map.ActionCatalogItem.Actions.Add(item);
            map.Record();
            map.Cancel();
            Assert.NotEmpty(map.ActionCatalogItem.Actions);
            Assert.Same(item, map.ActionCatalogItem.Actions.First());
        }