Skip to content

Conversation

@peibekwe
Copy link
Contributor

@peibekwe peibekwe commented Dec 3, 2025

Motivation and Context

Unit test for declarative object model AddConversationMessageExecutor

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 Dec 3, 2025
Copilot AI review requested due to automatic review settings December 3, 2025 21:42
@github-actions github-actions bot changed the title Add Unit test for declarative object model AddConversationMessageExecutor .NET: Add Unit test for declarative object model AddConversationMessageExecutor Dec 3, 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 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 AddConversationMessageExecutorTest with tests for user and agent roles
  • Added test for message creation without explicit role assignment
  • Updated MockAgentProvider to support the CreateMessageAsync operation

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

@peibekwe peibekwe added this pull request to the merge queue Dec 3, 2025
Merged via the queue into main with commit a26e9d6 Dec 3, 2025
14 checks passed
@crickman crickman deleted the peibekwe/declarative-tests branch December 4, 2025 17:16
This was referenced Dec 5, 2025
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