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

Tests for overriden methods #33

Closed almondtools closed 7 years ago

almondtools commented 7 years ago

Having two classes A extends B

will not be reliable.

almondtools commented 7 years ago

It is unclear whether this problem can be solved canonically, so logging a warning could be sufficient. Should be analyzed.

almondtools commented 7 years ago

A solution to this problem is mentioned here.

almondtools commented 7 years ago

Overriden methods are virtually not existent, so recording has limited value. Consequently there should be a message that recording has been skipped.

Yet unfortunately this message cannot be emitted after static analysis. There must be some guard which rules out the recording of methods that are overriden in the current call context.