using PlotLine.Models; internal static class WriterAuthoringTests { public static void Run(){void Check(bool ok,string name){if(!ok)throw new Exception(name);Console.WriteLine("PASS Writer authoring "+name);} Check(AuthoringSchema.Validate("Note",new Dictionary{{"SceneNoteTypeID","1"},{"NoteText",""}})!=null,"blank notes are rejected"); Check(AuthoringSchema.Validate("Checklist",new Dictionary{{"ItemText",new string('x',301)}})!=null,"reminder length is bounded"); Check(AuthoringSchema.Validate("Workflow",new Dictionary{{"Priority","11"}})!=null,"priority range is enforced"); Check(AuthoringSchema.Validate("Workflow",new Dictionary{{"DraftedDate","2026-02-30"}})!=null,"invalid calendar dates are rejected"); Check(AuthoringSchema.Validate("Workflow",new Dictionary{{"EstimatedWordCount","-2"}})!=null,"negative counts are rejected"); Check(AuthoringSchema.Validate("Scene",new Dictionary{{"ScenePurposeNotes"," — Unicode"}})==null,"ordinary author text remains text, not generated markup"); Check(AuthoringSchema.Validate("Goals",new Dictionary())==null,"chapter intentions remain optional"); Check(new AuthoringSection{Kind="Goals",Data="[]"}.Value("GoalSummary")=="","missing optional records render as empty values"); Check(AuthoringSchema.Validate("Scene",new Dictionary{{"ScenePurposeNotes",new string('界',25000)}})==null,"canonical unbounded supporting text is not arbitrarily truncated"); Check(AuthoringSchema.Validate("Unknown",new Dictionary())!=null,"unknown editor types are rejected"); } }