namespace M6502.HarteTest { public sealed class Test { public string? Name { get; set; } public State? Initial { get; set; } public State? Final { get; set; } public List>? Cycles { get; set; } public IEnumerable AvailableCycles() { if (this.Cycles == null) { throw new InvalidOperationException("Cycles have not been initialised"); } foreach (var cycle in this.Cycles) { yield return new Cycle(cycle); } } } }