mercredi 22 juin 2016

Using reflection to test methods of inner private class

Is there a way to test the methods of a private inner class using reflection? In the code below, how can we test func-1 and func-2

public class Outer extends AbstractOuter {
private final Properties properties;

public Outer(Properties properties) {
    this.properties = properties;
}

private class Inner extends AbstractInner {

    private int numOfProperties;

    @Override
    void func-1() throws Exception {
        //
    }

    private int func-2(long l)  {
        //
    }
}
}





Aucun commentaire:

Enregistrer un commentaire