Closed fingers10 closed 1 year ago
Your interface is generic IRequest
type differs from IRequest<>
.
@NeVeSpl it gives wrong result i.e the test still passes even if I change IRequest
to IRequest<>
The result is correct, your predicate is wrong. The second thing that is wrong is that interfaces are implemented not inherited.
[Fact]
public void Should_Have_Request_To_Be_Sealed()
{
var result =
Types.InAssembly(typeof(ApplicationServiceRegistration).Assembly)
.That()
.AreClasses()
.And()
.ImplementInterface(typeof(IRequest<>))
.Should()
.BeSealed()
.GetResult();
Assert.True(result.IsSuccessful);
}
I'm trying to
Assert
if all of my RequestClass
aresealed
using the below test,Here are the examples of my Request
Class
,As we can see, the Request
Class
are notsealed
, but still the test gets passed.Am I missing anything? Please assist.