-
Notifications
You must be signed in to change notification settings - Fork 942
.NET: Add Unit test for declarative object model AddConversationMessageExecutor #2613
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
Conversation
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.
Pull request overview
This PR adds comprehensive unit tests for the AddConversationMessageExecutor class, which is part of the declarative object model for workflows. The tests verify the executor's ability to add conversation messages with different roles and validate the message creation process.
Key Changes
- Added
AddConversationMessageExecutorTestwith tests for user and agent roles - Added test for message creation without explicit role assignment
- Updated
MockAgentProviderto support theCreateMessageAsyncoperation
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
AddConversationMessageExecutorTest.cs |
New test file with comprehensive unit tests for AddConversationMessageExecutor, including Theory-based tests for different message roles and Fact-based test for default role behavior |
MockAgentProvider.cs |
Extended mock provider to include setup for CreateMessageAsync method, returning the first test message for all invocations |
Motivation and Context
Unit test for declarative object model AddConversationMessageExecutor
Contribution Checklist
Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.