Skip to content

.NET: Add Unit test for declarative object model AddConversationMessageExecutor - #2613

Merged
Peter Ibekwe (peibekwe) merged 7 commits into
mainfrom
peibekwe/declarative-tests
Dec 3, 2025
Merged

.NET: Add Unit test for declarative object model AddConversationMessageExecutor#2613
Peter Ibekwe (peibekwe) merged 7 commits into
mainfrom
peibekwe/declarative-tests

Conversation

@peibekwe

Copy link
Copy Markdown
Contributor

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.

CopilotAI review requested due to automatic review settings December 3, 2025 21:42
@markwallace-microsoftMark Wallace (markwallace-microsoft) added the .NET Usage: [Issues, PRs], Target: .Net label Dec 3, 2025
@github-actionsgithub-actionsBot changed the title Add Unit test for declarative object model AddConversationMessageExecutor.NET: Add Unit test for declarative object model AddConversationMessageExecutorDec 3, 2025

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

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.

FileDescription
AddConversationMessageExecutorTest.csNew 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.csExtended mock provider to include setup for CreateMessageAsync method, returning the first test message for all invocations

@peibekwe
Peter Ibekwe (peibekwe) added this pull request to the merge queueDec 3, 2025
Merged via the queue into main with commit a26e9d6Dec 3, 2025
14 checks passed
@crickman
Chris (crickman) deleted the peibekwe/declarative-tests branch December 4, 2025 17:16
Aris Nguyen (arisng) pushed a commit to arisng/agent-framework that referenced this pull request Feb 2, 2026
…geExecutor (microsoft#2613)
* Added unit test for RetrieveConversationMessagesExecutor
* Unit test for declarative object model AddConversationMessageExecutor
* Remove unnecessary test.
* Fix test.
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

.NETUsage: [Issues, PRs], Target: .Net

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

5 participants

@peibekwe@alliscode@crickman@markwallace-microsoft