public void stop_sets_keyboard_state_false() { Keyboard.IsKeySuppressionActive = false; var map = new HOTASButton(); map.Record(); map.Stop(); Assert.False(Keyboard.IsKeySuppressionActive); }
public void stop_keeps_only_new_actions() { var map = new HOTASButton(); var item = new ButtonAction() { ScanCode = 1, IsExtended = true, TimeInMilliseconds = 1 }; map.ActionCatalogItem.Actions.Add(item); map.Record(); var newItem = new ButtonAction() { ScanCode = 1, IsExtended = true, TimeInMilliseconds = 1 }; map.ActionCatalogItem.Actions.Add(newItem); map.Stop(); Assert.NotSame(item, map.ActionCatalogItem.Actions.First()); Assert.Same(newItem, map.ActionCatalogItem.Actions.First()); }