using DotnetStandardStreams; namespace DotnetStandardStreamsTests; public class ListOutputTargetTests { [Fact] public void WritesToList() { ListOutputTarget target = new([]); target.Output("1"); target.Output("2"); target.Output(""); target.Output("3"); target.OutputList.Count.ShouldBe(4); target.OutputList[0].ShouldBe("1"); target.OutputList[1].ShouldBe("2"); target.OutputList[2].ShouldBe(string.Empty); target.OutputList[3].ShouldBe("3"); } }