-
Notifications
You must be signed in to change notification settings - Fork 29
Unit tests for MorganStanley.ComposeUI.Messaging.MessageRouterAdapter #1051
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
Unit tests for MorganStanley.ComposeUI.Messaging.MessageRouterAdapter #1051
Conversation
Codecov Report❌ Patch coverage is ❌ Your patch status has failed because the patch coverage (40.5%) is below the target coverage (100.0%). You can increase the patch coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## main #1051 +/- ##
=======================================
+ Coverage 65.6% 65.8% +0.1%
=======================================
Files 337 337
Lines 9979 9989 +10
Branches 1157 1107 -50
=======================================
+ Hits 6547 6573 +26
+ Misses 3164 3151 -13
+ Partials 268 265 -3
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please do rebase and add the tests based on the changes that were applied to the repository.
src/fdc3/dotnet/DesktopAgent/src/MorganStanley.ComposeUI.DesktopAgent/Channels/Channel.cs
Outdated
Show resolved
Hide resolved
src/fdc3/dotnet/DesktopAgent/src/MorganStanley.ComposeUI.DesktopAgent/Channels/Channel.cs
Show resolved
Hide resolved
.../dotnet/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/Channels/TestChannel.cs
Outdated
Show resolved
Hide resolved
.../MorganStanley.ComposeUI.DesktopAgent.Tests/Channels/UserChannelErrorsAndDiagnosticsTests.cs
Show resolved
Hide resolved
...et/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/Channels/UserChannelTests.cs
Outdated
Show resolved
Hide resolved
...pter.MessageRouter.Tests/MorganStanley.ComposeUI.MessagingAdapter.MessageRouter.Tests.csproj
Outdated
Show resolved
Hide resolved
30372ed
to
868a35a
Compare
.../dotnet/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/Channels/TestChannel.cs
Show resolved
Hide resolved
.../MorganStanley.ComposeUI.DesktopAgent.Tests/Channels/UserChannelErrorsAndDiagnosticsTests.cs
Outdated
Show resolved
Hide resolved
Changes have been implemented.
Introduce new test projects and unit tests for MessageRouterAdapter and FDC3 DesktopAgent channels, improving coverage of exception handling, logging, and disposal logic. Refactor MessageRouterClient methods for readability, add defensive checks, and update object initialization. Enable InternalsVisibleTo for test access. No breaking changes to public APIs.
Moved <ImplicitUsings>enable</ImplicitUsings> from individual project files to Directory.Build.props for centralized management. This ensures implicit usings are enabled for all projects without redundant configuration. No other functional changes were made.
Refactored multiple files and classes to use file-scoped namespaces, reducing indentation and improving code clarity. Updated class declarations to top-level and internal where appropriate. No functional changes; these updates modernize the codebase, enhance readability, and align with current C# best practices.
The LogUnexpectedMessage method and its usages have been removed from the Channel and TestChannel classes. The associated unit test, LogUnexpectedMessage_LoggerEnabled_LogsDebugMessage, has also been deleted. This change eliminates logging for unexpected messages when closing a PrivateChannel and removes the related test coverage.
chore: Removed the <ImplicitUsings>enable</ImplicitUsings> property from MorganStanley.ComposeUI.AppDirectory.csproj, MorganStanley.ComposeUI.Messaging.MessageRouterAdapter.csproj, and MorganStanley.ComposeUI.ModuleLoader.Abstractions.csproj. Implicit using directive is defined in Directory.Build.props
e41f33e
to
3319fba
Compare
The README.md file was cleared of all content, including the project overview, setup instructions, code examples, and installation guidance for the ComposeUI FDC3 Desktop Agent. No replacement content was added.
...et/DesktopAgent/test/MorganStanley.ComposeUI.DesktopAgent.Tests/Channels/UserChannelTests.cs
Outdated
Show resolved
Hide resolved
Updated the test code to await Connect() directly after disposing the channel, removing the redundant AsTask() call. This streamlines the test and reflects changes in the Connect() method's return type or usage.
Messaging.sln
andDesktopAgent.sln
to includeMorganStanley.ComposeUI.Messaging.MessageRouterAdapter.Tests
project.UserChannelErrorsAndDiagnosticsTests.cs
with new test methods.UserChannelTests.cs
for handling null payloads and disposal behavior.TestChannel
class inTestChannel.cs
for testing internal logging methods.MessageRouterAdapterTests.cs
to validate exception handling inConnectAsync
andInvokeAsync
.MorganStanley.ComposeUI.Messaging.MessageRouterAdapter.Tests.csproj
with necessary dependencies.