almondtools / testrecorder

Create Test Fixtures from Runnable Java Code
http://testrecorder.amygdalum.net/
GNU Lesser General Public License v3.0
51 stars 5 forks source link

Support for hidden inner classes #2

Closed almondtools closed 8 years ago

almondtools commented 8 years ago

Serializing an Object containing a field typed with a public-invisible type (e.g. private inner class) produces imports (and assigments) with compile errors.

almondtools commented 8 years ago

First approach with e.g. com.almondtools.testrecorder.scenarios.HiddenInnerClass$Hidden

    @ReplacedBy("com.almondtools.testrecorder.scenarios.HiddenInnerClass$Hidden")
    private static class Hidden {
    }
almondtools commented 8 years ago

Solved. Yet not a static inner class will be produced but a Wrapped-Object containing the clazz and the object needed.