Static Enum values are needlessly overwritten #306
Labels
comp-codegen
Issue is related to code generator
ctg-enhancement
New feature, improvement or change request
priority-top-focus
Top priority chosen by dev team
Milestone
Description
The code generator overwrites static Enum values with themselves in tests where an Enum constant is required.
To Reproduce
Generate a test suite for the
EnumExamples.isRedOrGreen
method below.Expected behavior
No static field assignment should take place in any of generated test cases.
Test cases could look like the following example:
Actual behavior
Each test case involves static field assignments with their original values.
Visual proofs (screenshots, logs, images)
Environment
Java: 1.8.
Test framework: JUnit5.
Mock strategy: No mocks.
Mock static: No static mocking.
Timeout for class: 60 sec.
Parametrized test: Not parametrized.
Additional context
This issue is not critical, as tests are successfully generated and working. In a way, it may be more a feature request than a bug report.
The text was updated successfully, but these errors were encountered: