Fixed test case generation in cases of unfulfillable demands#89
Merged
TonyTroeff merged 3 commits intomainfrom Apr 22, 2026
Merged
Fixed test case generation in cases of unfulfillable demands#89TonyTroeff merged 3 commits intomainfrom
TonyTroeff merged 3 commits intomainfrom
Conversation
There was a problem hiding this comment.
Pull request overview
Fixes test discovery so that when requirements exist but no utilities remain after applying demands, no test cases are generated/discovered (addresses #86).
Changes:
- Added the ability to register an initialization category with zero values (
Register(category)), and updated collection construction sites to use it. - Updated discovery/assembly-data/serialization/dependency-building paths to ensure required categories are present even when filtered to empty.
- Added unit tests covering “no test cases when all required utilities are filtered out” and “single test case when nothing is required”.
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| TryAtSoftware.CleanTests.Core/XUnit/Serialization/SerializableInitializationUtility.cs | Ensures demand categories are registered before adding demand entries during deserialization. |
| TryAtSoftware.CleanTests.Core/XUnit/Discovery/CleanTestFrameworkDiscoverer.cs | Registers required categories even if no matching utilities exist, preventing combinations/testcases from being generated. |
| TryAtSoftware.CleanTests.Core/XUnit/CleanTestAssemblyData.cs | Registers utility categories explicitly before registering utilities. |
| TryAtSoftware.CleanTests.Core/Interfaces/ICleanTestInitializationCollection.cs | Adds Register(string category) to support empty-category registration. |
| TryAtSoftware.CleanTests.Core/Extensions/CleanTestsFrameworkExtensions.cs | Ensures categories are registered before copying/registering values; registers demand categories when extracting demands. |
| TryAtSoftware.CleanTests.Core/Construction/ConstructionManager.cs | Registers dependency categories before adding dependencies. |
| TryAtSoftware.CleanTests.Core/CleanTestInitializationCollection.cs | Implements Register(category); adjusts Register(category, value) behavior accordingly. |
| Tests/TryAtSoftware.CleanTests.UnitTests/Parametrization/EnvironmentSetup.cs | Updates test setup helpers to register categories before adding per-category values. |
| Tests/TryAtSoftware.CleanTests.UnitTests/CleanUtilitiesDistributionTests.cs | Adds regression tests for discovery behavior when demands filter out all required utilities. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Pull Request Description
If there are unfulfillable demands, no test cases will be generated. Everything else should work as expected.
Motivation and Context
This PR fixes #86.
Checklist