mardi 27 juin 2017

Testing class that extends abstract class

I need to write a test for a class that extends an abstract class. Problem starts when I need to test a method that has super reference. So the code looks something like this:

public abstract class AbstractClass{
    someMethod();
}

public class MyClass extends AbstractClass {
    methodToTest(){
        //somecode
        super.someMethod;
    }
}

Any idea how should I get around it?

Aucun commentaire:

Enregistrer un commentaire