Skip to content

Conversation

sofurihafe
Copy link
Member

Description

There was a problem that we could not create necessary variables in test methods because they were already instantiated and constructed in class field processing. This PR fixes the problem. Now, they are being constructed in each test method.

Fixes #2107

How to test

Automated tests

Not relevant.

Manual tests

  1. Open external project.
  2. Create tests for PetTypeFormatter.parse().
  3. Every arrayList, string, anonymousPetType variable must be instantiated in test method when it is needed.

@sofurihafe sofurihafe added comp-codegen Issue is related to code generator ctg-bug-fix PR is fixing a bug comp-spring Issue is related to Spring projects support labels Apr 10, 2023
@EgorkaKulikov EgorkaKulikov enabled auto-merge (squash) April 11, 2023 07:23
@EgorkaKulikov EgorkaKulikov merged commit a6b5ff7 into main Apr 11, 2023
@EgorkaKulikov EgorkaKulikov deleted the andrey-t/spring_remove_unwanted_instantiations branch April 11, 2023 08:24
@alisevych alisevych added this to the Spring Phase 1 milestone Apr 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
comp-codegen Issue is related to code generator comp-spring Issue is related to Spring projects support ctg-bug-fix PR is fixing a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect mock for a method returning List of entities
3 participants