/** * C# test emitter — TypeNode → xUnit test file. * * Replaces `test.cs.njk` Nunjucks template with a typed TypeScript function * that produces a complete C# xUnit test class. * * Each TypeNode with samples/coercions/factories gets one test file * containing LoadYaml, LoadJson, roundtrip, and validity tests. */ import { FactoryEntry } from "../../decorators.js"; import { TypeNode } from "../../ir/ast.js"; export interface CSharpTestContext { node: TypeNode; namespace: string; examples: Array<{ json: string[]; yaml: string[]; sample?: Record; validations: Array<{ key: string; value: any; isExpression: boolean; withheldOnSave?: boolean; }>; }>; coercions: Array<{ title: string; scalar: string; value: string | number; validations: Array<{ key: string; value: any; delimiter: string; }>; }>; factories: FactoryEntry[]; /** Property keys whose C# type is 32-bit `float`, so their test literals need an `f` suffix. */ singlePrecisionKeys: ReadonlySet; renderName: (name: string) => string; renderCsharpFactoryMethodName: (factoryName: string) => string; renderCsharpFactoryTestValue: (typeStr: string) => string; } /** * Emit a complete C# xUnit test file for a type node. */ export declare function emitCSharpTest(ctx: CSharpTestContext): string;