elsa-core/test/integration/Elsa.Activities.IntegrationTests
Sipke Schoorstra b0d93d347b
Add unit and integration tests for DownloadHttpFile activity (#7094)
* Add unit and integration tests for `DownloadHttpFile` activity

- Developed comprehensive unit tests for the `DownloadHttpFile` activity validating method execution (GET, POST), URL handling, headers, and status codes.
- Added integration tests to verify functionality like authorization headers, filename extraction, and response stream handling.
- Updated `IntegrationTests` project references to include the required `Elsa.Http` module.

* Refactor `DownloadHttpFileTests` to simplify test setup and improve reusability

- Consolidated test initialization logic into `RunActivityAsync` for cleaner and reusable test setup.
- Updated existing tests to use `RunActivityAsync`, reducing boilerplate code.
- Unified filename extraction tests into a parameterized theory to improve test coverage and clarity.
- Simplified helper handlers with expression-bodied members for readability.

* Add comments to clarify HttpResponseMessage disposal responsibility in `DownloadHttpFileTests`.

* Ensure `HttpResponseMessage.Content` is always set to prevent null reference issues in `DownloadHttpFileTests`.

* Refactor `DownloadHttpFileTests` to ensure `HttpResponseMessage.Content` is always initialized and simplify content assignment logic.

* Update `DownloadHttpFileTests` to set an empty `HttpResponseMessage.Content` for testing `HasContent` behavior

* Add `GitHubActionsTestLogger` package to test projects and refactor `Directory.Packages.props`

- Updated unit and integration test projects to include `GitHubActionsTestLogger` for improved test reporting in CI.
- Refactored `Directory.Packages.props` to add conditional dependencies for .NET 8, 9, and 10 compatibility.

* Remove `GitHubActionsTestLogger` package from test projects.

* Add project reference for unit tests and update `DownloadHttpFileTests`

- Included `Elsa.Activities.UnitTests` project reference in `IntegrationTests` to reuse helpers.
- Removed redundant `TestHttpMessageHandler` by utilizing shared helper from `UnitTests`.

* Refactor `DownloadHttpFileTests` to remove unused methods and simplify imports

* Update target framework to .NET 10 and upgrade `Nuke.Components` package to v10.0.0
2025-11-24 14:37:06 +01:00
..
Branching Flow Join integration tests - Reducing unnecessary logic 2025-11-05 08:59:28 +01:00
Flow Adds SetVariable activity unit tests (#6989) 2025-10-22 20:54:58 +02:00
Http Add unit and integration tests for DownloadHttpFile activity (#7094) 2025-11-24 14:37:06 +01:00
Elsa.Activities.IntegrationTests.csproj Add unit and integration tests for DownloadHttpFile activity (#7094) 2025-11-24 14:37:06 +01:00
ForEachTests.cs Update nullable argument defaults and enhance ForEach tests with additional edge cases. (#6928) 2025-09-27 17:55:40 +02:00
ParallelTests.cs Feat/unit test coverage sendhttprequest (#6961) 2025-10-20 20:11:46 +02:00
SetNameTests.cs Improved support for named workflow instances 2025-03-02 11:17:18 +01:00
SetOutputTests.cs Remove unused test cases and workflows from SetOutputTests to simplify integration test coverage. 2025-10-22 23:46:17 +02:00
SetVariableTests.cs Adds SetVariable activity unit tests (#6989) 2025-10-22 20:54:58 +02:00
Usings.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00
WriteLineTests.cs Refactor Workflow Runtimes (#5444) 2024-06-10 19:36:51 +02:00