Example #1
0
        public void TestReset()
        {
            var target = new FairlightMixerSourceEqualizerResetCommand
            {
                Mask = FairlightMixerSourceEqualizerResetCommand.MaskFlags.Band
            };
            var handler = CommandGenerator.MatchCommand(target);

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.FairlightMain, helper =>
            {
                ForSampleOfBands(helper, (stateBefore, bandState, band, inputId, sourceId, index) =>
                {
                    uint timeBefore = helper.Server.CurrentTime;

                    target.Index    = (AudioSource)inputId;
                    target.SourceId = sourceId;
                    target.Band     = index;

                    helper.SendAndWaitForChange(null, () => { band.Reset(); });

                    // It should have sent a response, but we dont expect any comparable data
                    Assert.NotEqual(timeBefore, helper.Server.CurrentTime);
                });
            });
        }
Example #2
0
        public void TestEqualizerReset()
        {
            var target = new FairlightMixerSourceEqualizerResetCommand {
                Mask = FairlightMixerSourceEqualizerResetCommand.MaskFlags.Equalizer
            };
            var handler = CommandGenerator.MatchCommand(target, true);

            AtemMockServerWrapper.Each(_output, _pool, handler, DeviceTestCases.FairlightMain, helper =>
            {
                EachRandomSource(helper, (stateBefore, srcState, inputId, src, i) =>
                {
                    IBMDSwitcherFairlightAudioEqualizer eq = GetEqualizer(src);

                    target.Index    = (AudioSource)inputId;
                    target.SourceId = srcState.SourceId;

                    uint timeBefore = helper.Server.CurrentTime;

                    helper.SendAndWaitForChange(null, () => { eq.Reset(); });

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