elsa-core/test/unit/Elsa.Workflows.Core.UnitTests
Copilot 40a7583f62
Fix spurious duplicate activity registry warnings during startup (#7183)
* Initial plan

* Fix: Remove bogus duplicate activity registry warnings during refresh

The ActivityRegistry.RefreshDescriptorsAsync() method was starting with existing descriptors, causing false warnings when intentionally repopulating the registry. Now starts fresh but preserves manual descriptors.

Co-authored-by: KnibbsyMan <23156317+KnibbsyMan@users.noreply.github.com>

* Add tests for ActivityRegistry refresh behavior

Added comprehensive tests to verify:
1. No warnings logged during intentional registry refresh
2. Manual descriptors preserved during refresh
3. True duplicates from different providers still logged

Co-authored-by: KnibbsyMan <23156317+KnibbsyMan@users.noreply.github.com>

* Apply code review feedback: track manual descriptors in providersDictionary and clarify comments

- Track _manualActivityDescriptors in providersDictionary under GetType() key for consistency
- Clarify comments to be more specific about GetType() provider and RegisterAsync(Type activityType) method
- Avoid duplicate entries in provider list when descriptor already preserved

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

* Minor style improvement: use Count > 0 instead of !Count.Equals(0)

Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: KnibbsyMan <23156317+KnibbsyMan@users.noreply.github.com>
Co-authored-by: sfmskywalker <938393+sfmskywalker@users.noreply.github.com>
2026-01-16 12:14:24 +01:00
..
Extensions/ActivityExecutionContextExtensions Feat/unit test coverage sendhttprequest (#6961) 2025-10-20 20:11:46 +02:00
Flowchart Update flowchart activity scheduling, implicit join (and FlowJoin/WaitAll) now only waits for followed connections 2025-02-12 23:27:40 -05:00
Models Add unit tests to document and verify reserved keywords (#7180) 2026-01-06 11:09:59 +01:00
ObjectConversion Fix ObjectConverter.ConvertTo to avoid using sourceTypeConverter.IsValid (#6972) 2025-10-16 13:51:37 +02:00
Serialization/Converters Added logic to search for workflow-as-activities based on DefinitionId (not only versionId) (#7149) 2025-12-17 23:23:49 +01:00
Services Fix spurious duplicate activity registry warnings during startup (#7183) 2026-01-16 12:14:24 +01:00
Elsa.Workflows.Core.UnitTests.csproj Add code coverage configuration and adjust test projects (#7049) 2025-11-12 13:59:36 +01:00
ExpressionExecutionContextExtensionsTests.cs Fix SetVariable test (#6656) 2025-05-20 11:52:57 +02:00