Conversation
Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add unit test class for CopyConversationMessagesExecutor
Add unit tests for CopyConversationMessagesExecutor
Feb 11, 2026
crickman
approved these changes
Feb 11, 2026
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds comprehensive unit test coverage for CopyConversationMessagesExecutor, a component that copies messages into agent conversations within the declarative workflows system. The tests validate message copying behavior across different input formats (string, single record, multiple messages in table), expression types (literal vs. PowerFx variable), conversation contexts (workflow vs. external), and edge cases (blank/null messages).
Changes:
- Added
CopyConversationMessagesExecutorTest.cswith 7 test methods covering all execution paths - Refactored
GetInputMessages()inCopyConversationMessagesExecutor.csto add explicit null validation usingThrow.IfNull, removing conditional null handling
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
CopyConversationMessagesExecutorTest.cs |
New test class with 7 test methods following established patterns, using MockAgentProvider for message capture and verification |
CopyConversationMessagesExecutor.cs |
Refactored GetInputMessages() to add explicit Throw.IfNull validation for required Messages property, simplifying control flow |
peibekwe
approved these changes
Feb 11, 2026
alliscode
approved these changes
Feb 11, 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.
Motivation and Context
Adds test coverage for
CopyConversationMessagesExecutorto validate message copying behavior across different input formats and conversation contexts.Description
Test Coverage (7 test methods)
Implementation
CopyConversationMessagesExecutorTest.csinObjectModelfolderExecuteTestAsyncandCreateModelhelper methodsMockAgentProviderfor message capture and verificationAchieves 100% code coverage of all execution paths including:
ExecuteAsync: message iteration, conversation type detection, event generationGetInputMessages: expression evaluation and message conversionContribution Checklist