Skip to content

Conversation

@vbreuss
Copy link
Member

@vbreuss vbreuss commented Sep 14, 2024

Add a custom AutoDomainData extension of AutoDataAttribute, that uses NSubstitute and allows for domain-specific customizations.

In order to apply a customization for all tests in a project, add a class implementing the IAutoDataCustomization interface. This customization is then applied to all tests using the [AutoDomainData] attribute.

Additionally this attribute has a property CustomizeWith which can point to a class implementing the ICustomization interface and which is then applied to this test only.

@vbreuss vbreuss added the refactor A change or improvement without functional impact label Sep 14, 2024
@vbreuss vbreuss self-assigned this Sep 14, 2024
@sonarqubecloud
Copy link

@vbreuss vbreuss enabled auto-merge (squash) September 14, 2024 13:57
@github-actions
Copy link

Stryker.NET mutation tested the changes in the pull request:
Mutation testing badge

@vbreuss vbreuss merged commit 53ffd69 into main Sep 14, 2024
@vbreuss vbreuss deleted the topic/use-auto-domain-data-attribute branch September 14, 2024 14:07
@github-actions
Copy link

This is addressed in release v3.2.4.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

refactor A change or improvement without functional impact state: released

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants