You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working an a asp.net web api. for this I am generating the controller from a openapi specification. The generator generates the controller classes and methods as abstract.
What I now want to do is to check if all generated controller classes are inherited somewhere.
Finding all controller is easy by using Classes().That().ResideInNamespace("MyProject.Generated.*", true).And().AreAbstract().And() .HaveFullNameContaining("Controller"). What I am struggling with is
Finding all methods that are declared in those classes (As far as I can tell, MethodMembers().That().AreDeclaredIn() only accepts Types but Types cant be abstract (Is there to get types from classes?))
Finding all classes that inherit those abstract classes
The second point is more important because if all abstract classes are inherited, I can be sure that all abstract methods are overridden.
The text was updated successfully, but these errors were encountered:
Hi,
I am working an a asp.net web api. for this I am generating the controller from a openapi specification. The generator generates the controller classes and methods as abstract.
What I now want to do is to check if all generated controller classes are inherited somewhere.
Finding all controller is easy by using
Classes().That().ResideInNamespace("MyProject.Generated.*", true).And().AreAbstract().And() .HaveFullNameContaining("Controller")
. What I am struggling with isMethodMembers().That().AreDeclaredIn()
only accepts Types but Types cant be abstract (Is there to get types from classes?))The second point is more important because if all abstract classes are inherited, I can be sure that all abstract methods are overridden.
The text was updated successfully, but these errors were encountered: