public void TestHasUnsupportedOps() { AtemMockServerWrapper.Each(_output, _pool, null, DeviceTestCases.MacroTransfer, helper => { var pool = helper.SdkClient.SdkSwitcher as IBMDSwitcherMacroPool; Assert.NotNull(pool); ImmutableList <ICommand> previousCommands = helper.Server.GetParsedDataDump(); for (int i = 0; i < 10; i++) { AtemState stateBefore = helper.Helper.BuildLibState(); uint index = Randomiser.RangeInt((uint)stateBefore.Macros.Pool.Count); MacroPropertiesGetCommand cmd = previousCommands.OfType <MacroPropertiesGetCommand>().Single(c => c.Index == index); cmd.HasUnsupportedOps = i % 2 == 0; stateBefore.Macros.Pool[(int)index].HasUnsupportedOps = cmd.HasUnsupportedOps; helper.SendAndWaitForChange(stateBefore, () => { helper.Server.SendCommands(cmd); }); } }); }
private void UpdateMacroProps(MacroPropertiesGetCommand cmd) { lock (_macros) { _macros[cmd.Index] = cmd; } WebsocketMiddleware.SendToAllAsync(string.Format("{{\"Change\":{0}}}", cmd.Index)); }