コード例 #1
0
        public void TestSetTimecode()
        {
            var expectedCmd = new TimeCodeCommand();
            var handler     = CommandGenerator.MatchCommand(expectedCmd, false, "IsDropFrame");

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.All, helper =>
            {
                IBMDSwitcher switcher = helper.SdkClient.SdkSwitcher;

                AtemState stateBefore = helper.Helper.BuildLibState();

                uint timeBefore = helper.Server.CurrentTime;

                helper.SendAndWaitForChange(stateBefore,
                                            () =>
                {
                    switcher.SetTimeCode((byte)expectedCmd.Hour, (byte)expectedCmd.Minute,
                                         (byte)expectedCmd.Second, (byte)expectedCmd.Frame);
                });

                // It should have sent a response, but we dont expect any comparable data
                Assert.NotEqual(timeBefore, helper.Server.CurrentTime);
            });
        }