-
Notifications
You must be signed in to change notification settings - Fork 731
Closed
Description
Description
When trying to assert that an interface type has internal access, the following assertion message is thrown:
Expected expression to be Internal, but it is InvalidForCSharp.
Complete minimal example reproducing the issue
Assuming the following definition exists in the scope of the test:
internal interface ITest {}The following demonstrates the problem:
typeof(ITest).Should().HaveAccessModifier(CSharpAccessModifier.Internal);Expected behavior:
The assertion should succeed.
Actual behavior:
The following assertion message is thrown:
Expected typeof(ITest) ITest to be Internal, but it is InvalidForCSharp.
Versions
- Fluent Assertions version: 6.2.0
- Compiled against .NET 5.0
- Run against .NET 6.0