Add missing Spector scenario test coverage for C# emitter#9962
Draft
Add missing Spector scenario test coverage for C# emitter#9962
Conversation
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Co-authored-by: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Implement missing spector scenarios for C# emitter
Add missing Spector scenario test coverage for C# emitter
Mar 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several Spector scenarios had no corresponding NUnit test methods in the C# emitter test suite, leaving coverage gaps that would go undetected.
New tests added (31 total)
SpecialWords— ModelProperties (2)ModelProperties_DictMethodsAsync— dict method names as model propertiesModelProperties_WithListAsync—listas a model property namePayload/Multipart— FormData (5)WithWireName— multipart body with wire name mappingsOptionalParts— optional fields; sends 3 requests (id-only, image-only, both)FileUploadFileSpecificContentType,FileUploadFileRequiredFilename,FileUploadFileArray—FormDataFilesub-client scenariosRoutes/PathParameters— Expansion types (18)Added Standard + Explode × {primitive, array, record} for each of:
SimpleExpansion,PathExpansion,MatrixExpansionRoutes/QueryParameters— QueryContinuation Explode (3)QueryContinuationExplodePrimitive/Array/Record— marked[Ignore]consistent with existing QueryContinuation Standard tests (typespec/issues/5139)Payload/Xml(1)GetXmlErrorValue— verifies aClientResultExceptionwith status 400 on the error endpointType/Property/AdditionalProperties(2)SpreadRecordNonDiscriminatedUnion3Get/Put— additional properties typed asWidgetData2[] | WidgetData1; get-side parses the JSON array viaJsonDocument, put-side writes the array as rawBinaryDataOriginal prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.