using Xunit; using ytLive.Models; namespace ytLive.Tests; /// Creator ruling (2026-10-30): the top bar's primary button is context-sensitive and the /// separate TEST button is gone. /// /// EDIT off + ON-AIR → the livestream message. EDIT on + ON-AIR → the test-livestream /// message. REC always records, because there is no test recording. The matrix is pure, so it is /// cheaper to pin it here than to drive a window. public class SessionStartDecisionTests { [Fact] public void Edit_decides_whether_the_on_air_start_is_live_or_a_test() { // ON-AIR armed: EDIT decides. Assert.Equal(SessionStartKind.Live, SessionStartDecision.For(recordArmed: false, onAirArmed: true, editing: false)); Assert.Equal("Go Live", SessionStartDecision.LabelFor(SessionStartKind.Live)); Assert.Equal(SessionStartKind.Test, SessionStartDecision.For(recordArmed: false, onAirArmed: true, editing: true)); Assert.Equal("Test Stream", SessionStartDecision.LabelFor(SessionStartKind.Test)); // REC armed: always a recording, whatever EDIT says (no test recording exists). Assert.Equal(SessionStartKind.Record, SessionStartDecision.For(true, false, false)); Assert.Equal(SessionStartKind.Record, SessionStartDecision.For(true, false, true)); Assert.Equal("Start Recording", SessionStartDecision.LabelFor(SessionStartKind.Record)); // Unarmed start records locally (the no-dead-ends rule). Assert.Equal(SessionStartKind.Record, SessionStartDecision.For(false, false, false)); } }