public void TestSource() { bool tested = false; var handler = CommandGenerator.CreateAutoCommandHandler <TransitionStingerSetCommand, TransitionStingerGetCommand>("Source"); AtemMockServerWrapper.Each(Output, Pool, handler, DeviceTestCases.All, helper => { int mpCount = helper.Helper.BuildLibState().MediaPlayers.Count; List <StingerSource> sources = Enum.GetValues(typeof(StingerSource)).OfType <StingerSource>().Where(s => ((int)s) < mpCount).ToList(); if (sources.Count <= 1) { return; } EachMixEffect <IBMDSwitcherTransitionStingerParameters>(helper, (stateBefore, meBefore, sdk, meId, i) => { tested = true; Assert.NotNull(meBefore.Transition.Stinger); StingerSource target = sources[i]; _BMDSwitcherStingerTransitionSource target2 = AtemEnumMaps.StingerSourceMap[target]; meBefore.Transition.Stinger.Source = target; helper.SendAndWaitForChange(stateBefore, () => { sdk.SetSource(target2); }); }, sources.Count); }); Assert.True(tested); }
public static bool IsAvailable(this StingerSource src, DeviceProfile profile) { return(src.IsValid() && (int)src < profile.MediaPlayers + 1); }