When generating a test class, MoreUnit allows the generation of mocked dependencies based on fields in the class under test. However, if the class under test extends a superclass, dependencies for the superclass's fields are not generated.
The wizard offers to create dependencies based on the superclass's setX(...) methods, but no dependencies are generated.
To reproduce:
1. Create a class SuperClass with a private String foo, and getFoo(), setFoo(String) methods
2. Create a subclass SubClass extends Superclass
3. Generate a test class for SubClass
4. Confirm the 'Dependencies To Mock' step offers to create a mock based on the setFoo(String) method
5. Select Finish
No mocked dependencies will be created in the test class.
Hi Sam,
Thanks for your report! However I could not reproduce your problems (and I tried hard) so maybe I miss some information. Would it be possible for you to post the code that caused the problem (once anonymized of course), together with your MoreUnit settings?
By the way: we released a new version this night, you may want to give it a try.
Regards,
Nicolas
I tried and could not reproduce it. Closing it.