Open
Conversation
Add comprehensive test coverage across all four sample apps: - dotnet/a2a-raw.tests: 24 tests (ExtractText JSON parsing, arg parsing) - dotnet/rest.tests: 25 tests (BuildChatBody, Trunc, arg parsing) - dotnet/a2a.tests: 21 tests (Extract/Join with A2A SDK types, arg parsing) - rust/a2a: 34 inline tests (auth code extraction, JWT decode, message building, text joining, delta printing) - swift/a2a: 8 tests (ChatMessage model) + commented test suggestions for private members ~60% of tests cover non-happy-path scenarios: malformed JSON, empty/null inputs, arg parsing crashes (IndexOutOfRangeException, FormatException), JSON injection attempts, unicode/emoji, large payloads, and auth error priority handling. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Move testable pure functions (ParseArgs, ExtractText, BuildChatBody, Trunc, Extract, Join) from Program.cs into Helpers.cs files so tests exercise real production code instead of duplicated copies - Fix args[++i] crash when a flag is the last argument (returns error instead of IndexOutOfRangeException) in all 3 .NET samples - Fix int.Parse on --verbosity (use TryParse, return error instead of FormatException) in rest and a2a samples - Add WorkIQSamples.sln and scripts/test.sh for running all tests - Make Swift BearerTokenAuth internal and extract renderMarkdown as a free function so both can be unit tested (9 new Swift tests enabled) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add platform column to root sample table, include a2a-raw and Swift - Fix .NET SDK version: 8.0 -> 10.0, add Xcode to prerequisites - Add pre-obtained JWT examples to all .NET READMEs for macOS/Linux - Add explicit "WAM is Windows-only" notes to all .NET quick starts - Fix rest README: add missing --graph flag, --verbosity, --header params - Add Azure CLI install commands for all platforms (brew/winget/apt link) - Document Windows token cache path alongside Unix path in Rust README - Note NTFS vs Unix file permissions for cached tokens Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
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.
Summary
Adds comprehensive test coverage across all four sample apps — 104 tests total, ~60% covering non-happy-path scenarios.
Test suites
dotnet/a2a-raw.testsdotnet/rest.testsdotnet/a2a.testsrust/a2a(inline)swift/a2aNon-happy-path coverage
IndexOutOfRangeExceptionwhen flags like--tokenare last arg without a value (all 3 .NET samples)FormatExceptionon--verbosity abc(rest sample)Bugs documented by tests
These tests use
Assert.Throwsto prove existing bugs:args[++i]throwsIndexOutOfRangeExceptionif a flag is the last argumentint.Parse(args[++i])throwsFormatExceptionon non-integer verbosity