Skip to content

Conversation

@peibekwe
Copy link
Contributor

Motivation and Context

This PR adds unit test around the RetrieveConversationMessagesExecutor executor for declarative workflow. Updated MockAgentProvider as required.

Contribution Checklist

  • The code builds clean without any errors or warnings
  • The PR follows the Contribution Guidelines
  • All unit tests pass, and I have added new tests where possible
  • Is this a breaking change? If yes, add "[BREAKING]" prefix to the title of the PR.

@peibekwe peibekwe self-assigned this Nov 21, 2025
Copilot AI review requested due to automatic review settings November 21, 2025 20:47
@github-actions github-actions bot changed the title Add unit tests for RetrieveConversationMessagesExecutor .NET: Add unit tests for RetrieveConversationMessagesExecutor Nov 21, 2025
Copy link
Contributor

Copilot AI left a 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 MockAgentProvider from single message to message list support
  • Updated existing RetrieveConversationMessageExecutorTest to 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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants