Closed
Description
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 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.