Beispiel #1
0
        public void TestSetAudioInvalid()
        {
            AtemMockServerWrapper.Each(_output, _pool, ClearAudioCommandHandler, DeviceTestCases.MediaPlayerClips, helper =>
            {
                ImmutableList <ICommand> previousCommands = helper.Server.GetParsedDataDump();

                int clipCount = helper.Helper.BuildLibState().MediaPool.Clips.Count;
                for (int index = 0; index < clipCount; index++)
                {
                    AtemState stateBefore = helper.Helper.BuildLibState();

                    IBMDSwitcherClip clip = GetClip(helper, (uint)index);

                    for (int i = 0; i < 5; i++)
                    {
                        MediaPoolAudioDescriptionCommand cmd = previousCommands
                                                               .OfType <MediaPoolAudioDescriptionCommand>().Single(c => c.Index == index + 1);
                        cmd.IsUsed = true;

                        // Set it to true first
                        stateBefore.MediaPool.Clips[index].Audio.IsUsed = true;
                        helper.SendFromServerAndWaitForChange(stateBefore, cmd);

                        // Now set invalid
                        stateBefore.MediaPool.Clips[index].Audio.IsUsed = false;
                        helper.SendAndWaitForChange(stateBefore, () => { clip.SetAudioInvalid(); });
                    }
                }
            });
        }