Skip to content

Mock for LocalDate is created with same variable name as mock for PetType #2638

@alisevych

Description

@alisevych

Description

There are two variables with name petTypeMock created in Unit tests for Pet

To Reproduce

  1. Install -IU- UnitTestBot plugin in IntelliJ IDEA
  2. Open spring-petclinic
  3. Generate Unit tests for Pet with PetClinicApplication / No Configuration

Expected behavior

No mock for LocalDate is expected.
Variables for mocks should be with unique consistent names.
Tests should be compiled.

Actual behavior

There is mock for LocalDate.
There are two variables with name petTypeMock.
Tests are not compiling.

Screenshots, logs

image

image

Environment

IntelliJ IDEA version - Community 2023.2
Project - Maven
JDK - 17

Metadata

Metadata

Assignees

Labels

comp-codegenIssue is related to code generatorcomp-springIssue is related to Spring projects supportctg-bugIssue is a bug

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions