-
Notifications
You must be signed in to change notification settings - Fork 0
Fix test building and replace mocks with actual implementations in structure tests #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Co-authored-by: Vlas-Omsk <62666113+Vlas-Omsk@users.noreply.github.com>
…ructure tests Co-authored-by: Vlas-Omsk <62666113+Vlas-Omsk@users.noreply.github.com>
…ponents Co-authored-by: Vlas-Omsk <62666113+Vlas-Omsk@users.noreply.github.com>
This reverts commit 31a6bce.
|
|
Co-authored-by: Vlas-Omsk <62666113+Vlas-Omsk@users.noreply.github.com>
Fixed both issues in commit 141dc8f:
The structure tests now compile successfully and test actual implementations instead of mocks while maintaining the comprehensive Write→Send→Check and Receive→Read→Check patterns. |
|
@copilot |
…mpilation and test issues Co-authored-by: Vlas-Omsk <62666113+Vlas-Omsk@users.noreply.github.com>
Fixed all compilation issues in ConvertersTests, OptionsParserTests and OptionsSerializerTests in commit 331b5ab. Updated the tests to match the new API where:
All 36 tests in these classes now build and pass successfully. |
This PR addresses build issues and improves test coverage by replacing mock implementations with actual production code.
Build Fixes
Fixed compilation errors across the test suite:
IOptionConverter.Convertnow acceptsIReadOnlyList<string>?instead ofstringOptionsParsermethods work withIReadOnlyDictionary<string, IReadOnlyList<string>?>instead ofDictionary<string, string?>OptionsSerializer.Serializeexpects the new dictionary type formatStructure Tests Improvements
Completely rewrote structure tests to use real implementations instead of mocks:
Before:
After:
Test Coverage
The comprehensive structure tests now validate actual implementations:
DataCrypto.Create()factoryPlainCryptoimplementationControlChannelimplementationDataChannelimplementationSessionChannelimplementationTlsCryptWrapperimplementationAll tests maintain comprehensive Write→Send→Check and Receive→Read→Check patterns while now testing actual production code paths instead of mock behavior. The options-related tests (ConvertersTests, OptionsParserTests, OptionsSerializerTests) now build and pass with the updated API.
💡 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.