elsa-core/test/unit/Elsa.Activities.UnitTests
Sipke Schoorstra 84c04341f9
Add unit tests for FlowSendHttpRequest activity and refactor helper utilities (#6997)
* Add unit tests for `FlowFork` activity and enhance test utilities

- Introduce `FlowForkTests` to validate activity behavior with various branch configurations.
- Extend `ActivityExecutionContextExtensions` with methods to retrieve and check outcomes.
- Modify `ActivityTestFixture` to ensure activities transition to `Running` status before execution.

* Add unit tests for `FlowSwitch` activity and extend test utilities

- Implement `FlowSwitchTests` to verify behavior based on switch cases, modes, and literal expressions.
- Enhance `ActivityExecutionContextExtensions` with methods to retrieve and check outcomes in execution context.

* Update test guidelines to include examples for checking activity outcomes

- Add unit test examples for validating multiple and default outcomes.
- Extend documentation to describe new `ActivityExecutionContextExtensions` methods: `GetOutcomes` and `HasOutcome`.

* Apply suggestion from @Copilot

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* Simplify `GetOutcomes` method in `ActivityExecutionContextExtensions`.

* Add unit tests for `FlowSendHttpRequest` activity and refactor helper utilities

- Introduce `FlowSendHttpRequestTests` to validate activity behavior across various scenarios.
- Add utility methods in `SendHttpRequestTestHelpers` for creating mock responses and exceptions.
- Refactor `Helpers` namespace to `Http.Helpers` for better organization.
- Update project file to reflect namespace adjustments.

* Update test/unit/Elsa.Activities.UnitTests/Elsa.Activities.UnitTests.csproj

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-21 15:36:54 +02:00
..
Branching Adds unit tests for FlowSwitch activity (#6996) 2025-10-21 15:36:12 +02:00
Console Feat/unit test coverage sendhttprequest (#6961) 2025-10-20 20:11:46 +02:00
Http Add unit tests for FlowSendHttpRequest activity and refactor helper utilities (#6997) 2025-10-21 15:36:54 +02:00
Parallel Feat/unit test coverage sendhttprequest (#6961) 2025-10-20 20:11:46 +02:00
Primitives Fix file encoding 2025-10-20 20:13:32 +02:00
Elsa.Activities.UnitTests.csproj Feat/unit test coverage sendhttprequest (#6961) 2025-10-20 20:11:46 +02:00
Usings.cs (WIP) Initial context helper + provisional unit tests for setvariable 2025-10-07 15:56:08 +02:00