-
Notifications
You must be signed in to change notification settings - Fork 945
.NET: Add unit tests for RetrieveConversationMessagesExecutor #2388
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 RetrieveConversationMessagesExecutor class in the declarative workflow framework. The changes refactor the MockAgentProvider to better support testing of methods that retrieve multiple messages.
Key changes:
- New test file with two test cases covering basic and advanced retrieval scenarios
- Refactored
MockAgentProviderfrom single message to message list support - Updated existing
RetrieveConversationMessageExecutorTestto work with the refactored mock
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| RetrieveConversationMessagesExecutorTest.cs | New test class with tests for retrieving conversation messages with and without optional parameters |
| MockAgentProvider.cs | Refactored to use TestMessages list instead of single TestChatMessage, added GetMessagesAsync mock setup and ToAsyncEnumerableAsync helper |
| RetrieveConversationMessageExecutorTest.cs | Updated to retrieve first message from TestMessages list instead of TestChatMessage property |
Motivation and Context
This PR adds unit test around the RetrieveConversationMessagesExecutor executor for declarative workflow. Updated MockAgentProvider as required.
Contribution Checklist
Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.