Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not generate fluent assertion extensions for types that are not public #29

Open
JMarianczuk opened this issue Jul 25, 2023 · 1 comment

Comments

@JMarianczuk
Copy link
Contributor

e.g. when there is

[UnionType]
internal abstract partial record SomeUnionType {}

then the fluent assertion extensions and assertions class should not be generated in the unit test project that references that project, because the compiler will complain that the internal class is not accessible

@JMarianczuk
Copy link
Contributor Author

A workaround is to put

<InternalsVisibleTo Include="The.Test.Project" />

into the project with internal classes, but that is not a clean solution.
When someone has declared <InternalsVisibleTo ... /> and wants to assert the internal types, maybe a global attribute is necessary to indicate that.
Maybe something like

[global: GenerateExtensionsForInternalTypes(true)]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant