CoView Test Case Wizard: Testing Interfaces and Abstract Classes with CoView
CoViewDeveloper and CoViewManager help test interfaces and abstract classes by allowing you to specify a concrete stub that will be used during the tests.
To create a test for an interface or an abstract class open the CoView JUnit Test Case wizard.
Both CoView products detects that the item under test is not a concrete object and displays a dialog with three choices:
- Choose an existing concrete class through which to test. CoView allows you to browse for an existing concrete class that implements the interface or extends the abstract class. Creation of the test case proceeds using the selected stub class as the class under test, allowing you to access the abstract methods in the parent class, if any.
- Create a new concrete class through which to test. CoView uses the Eclipse class creation wizard to allow you to create a new concrete stub that implements the interface or extend the abstract class. Creation of the test case proceeds using the selected stub class as the class under test, allowing you to access the abstract methods in the parent class, if any.
- Use interface or abstract class directly. No concrete stub is created in this case, which may result in code that does not compile, but which may be useful in your specific environment.