using ytLive.Services; using Xunit; namespace ytLive.Tests; public class TransitionFadeTests { [Fact] public void Fade_Without_A_From_Frame_Requests_Capture_And_Blends_Once_Supplied() { var transition = new TransitionService(); var to = new VideoFrame(2, 2, Enumerable.Repeat((byte)255, 16).ToArray()); var from = new VideoFrame(2, 2, new byte[16]); transition.Start(TransitionType.Fade, 300, null); Assert.True(transition.CaptureRequested); transition.SupplyFromFrame(from); Assert.False(transition.CaptureRequested); transition.Tick(150); var blended = transition.BlendFrame(to); Assert.NotSame(to, blended); Assert.NotEqual((byte)255, blended.BgraPixels[0]); } }