-
Notifications
You must be signed in to change notification settings - Fork 1.1k
.NET Workflows - Add unit tests for EditTableExecutorAction (Declarative Workflows) #3832
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
Open
Copilot
wants to merge
9
commits into
main
Choose a base branch
from
copilot/add-unit-test-for-edit-table-executor
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+442
−0
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Add unit test class for EditTableExecutor
Add unit tests for EditTableExecutor with 100% coverage
Feb 10, 2026
Co-authored-by: crickman <66376200+crickman@users.noreply.github.com>
Copilot
AI
changed the title
.NET: Add unit tests for EditTableExecutor with 100% coverage
Remove redundant State.Bind() calls from EditTableExecutorTest
Feb 10, 2026
crickman
approved these changes
Feb 11, 2026
Contributor
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
Adds a dedicated unit test suite for the declarative workflow EditTableExecutor, validating expected state updates across supported TableChangeType operations and a few key failure/edge scenarios.
Changes:
- Introduces
EditTableExecutorTestcoverage for Add/Remove/Clear/TakeFirst/TakeLast behaviors, including empty-table cases. - Adds negative tests for invalid model construction and non-table variables, plus a remove-with-non-table-value scenario.
...sts/Microsoft.Agents.AI.Workflows.Declarative.UnitTests/ObjectModel/EditTableExecutorTest.cs
Outdated
Show resolved
Hide resolved
…ts/ObjectModel/EditTableExecutorTest.cs Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
declarative-workflow
.NET
v1.0
Features being tracked for the version 1.0 GA
workflows
Related to Workflows in agent-framework
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation and Context
WorkflowFormulaStateautomatically callsBind()in its constructor, syncing variables to the PowerFx engine. ExplicitState.Bind()calls afterState.Set()were redundant in most test cases.Description
When Bind() is needed:
Only when variables set via
State.Set()will be referenced in PowerFx expressions during test execution:When Bind() is not needed:
After
State.Set()calls where variables aren't used in subsequent expressions - the constructor already bound initial state.Kept one necessary
State.Bind()inAddWithExpressionAsyncwith explanatory comment.Contribution Checklist