private static void ValidateTableData(MappingsData data) { data.Switches.Length.Should().Be(4); data.Switches[0].Id.Should().Be("s_create_ball"); data.Switches[0].Description.Should().Be("Create Ball"); data.Switches[0].Source.Should().Be(SwitchSource.InputSystem); data.Switches[0].InputActionMap.Should().Be("Visual Pinball Engine"); data.Switches[0].InputAction.Should().Be("Create Ball"); data.Switches[0].Type.Should().Be(SwitchType.OnOff); data.Switches[1].Id.Should().Be("s_left_flipper"); data.Switches[1].Description.Should().Be("Left Flipper"); data.Switches[1].Source.Should().Be(SwitchSource.InputSystem); data.Switches[1].InputActionMap.Should().Be("Cabinet Switches"); data.Switches[1].InputAction.Should().Be("Left Flipper"); data.Switches[1].Type.Should().Be(SwitchType.OnOff); data.Switches[2].Id.Should().Be("s_plunger"); data.Switches[2].Description.Should().Be("Plunger"); data.Switches[2].Source.Should().Be(SwitchSource.Playfield); data.Switches[2].PlayfieldItem.Should().Be("Bumper1"); data.Switches[2].Type.Should().Be(SwitchType.Pulse); data.Switches[2].PulseDelay.Should().Be(20); data.Switches[3].Id.Should().Be("s_right_flipper"); data.Switches[3].Description.Should().Be("Right Flipper"); data.Switches[3].Source.Should().Be(SwitchSource.Constant); data.Switches[3].Constant.Should().Be(SwitchConstant.NormallyClosed); data.Coils.Length.Should().Be(2); data.Coils[0].Id.Should().Be("c_auto_plunger"); data.Coils[0].Description.Should().Be("Auto Plunger"); data.Coils[0].Destination.Should().Be(CoilDestination.Playfield); data.Coils[0].PlayfieldItem.Should().Be("Plunger1"); data.Coils[0].Type.Should().Be(CoilType.SingleWound); data.Coils[1].Id.Should().Be("c_left_flipper"); data.Coils[1].Description.Should().Be("Left Flipper"); data.Coils[1].Destination.Should().Be(CoilDestination.Playfield); data.Coils[1].PlayfieldItem.Should().Be("Flipper1"); data.Coils[1].Type.Should().Be(CoilType.DualWound); data.Coils[1].HoldCoilId.Should().Be("c_left_flipper_hold"); }
public void RestoreMappings(MappingsData mappings) { Mappings.Coils = mappings.Coils.ToArray(); Mappings.Switches = mappings.Switches.ToArray(); Mappings.Wires = mappings.Wires.ToArray(); }