How to exclude class name from inherited test name in NUnit

I have a base class with testcases (methods). Also I have another class inherited from the base class with some overloaded test cases (methods). The problem is that the names of the inherited test places (in the interpretation of NUnit) contain the name of the base class. Is it possible to exclude the name of the base class from the name of the inherited test cases and make it look like an overloaded one.

For instance:

inherited method in childClass:

Namespace.parentClass.childClass.name 

overloaded method in childClass:

 Namespace.childClass.name 
+4
source share
1 answer

You can remove the β€œtest case” attribute from test cases in the base class and add test case methods to the child class, which simply invokes methods in the base class. Those. the child class explicitly declares the tests themselves, but overrides the base class implementation.

0
source

All Articles