[BLUEJ-447] Bench to fixture doesn't always use correct names
The bench-to-fixture feature uses the original object names, not the actual names. Easiest to explain via steps to produce:
-
Create some test with a couple of objects in a fixture, e.g. item1 and itemA.
-
Execute fixture-to-bench once: item1 and itemA get added to the bench.
-
Execute fixture-to-bench again: item1 and itemA get added to the bench again, but are renamed item12 and itemA2 to avoid duplicate names.
-
Now execute bench-to-fixture for a different class: code is generated with two item1 fields and two itemA fields, which leads to a compile error.
Issue metadata
- Issue type: Bug
- Priority: Medium