From ee00810ea9376203a7e09e0d8b499ba1cf832ebb Mon Sep 17 00:00:00 2001 From: Marcelo Shima Date: Mon, 5 Feb 2024 20:51:24 -0300 Subject: [PATCH] Update _persistClass_IntegrationTestSamplesBuilder.java.ejs --- ...persistClass_IntegrationTestSamplesBuilder.java.ejs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/generators/spring-boot/templates/src/test/java/_package_/_entityPackage_/domain/_persistClass_IntegrationTestSamplesBuilder.java.ejs b/generators/spring-boot/templates/src/test/java/_package_/_entityPackage_/domain/_persistClass_IntegrationTestSamplesBuilder.java.ejs index a810c87bb128..cd861605c8b6 100644 --- a/generators/spring-boot/templates/src/test/java/_package_/_entityPackage_/domain/_persistClass_IntegrationTestSamplesBuilder.java.ejs +++ b/generators/spring-boot/templates/src/test/java/_package_/_entityPackage_/domain/_persistClass_IntegrationTestSamplesBuilder.java.ejs @@ -1,6 +1,6 @@ package <%= entityAbsolutePackage %>.domain; -import <%= entityAbsolutePackage %>.repository.<%= persistClass %>Repository; +import <%= entityAbsolutePackage %>.repository.<%= entityClass %>Repository; <%_ if (entityAbsolutePackage !== packageName) { _%> import <%= packageName %>.domain.IntegrationTestSample; <%_ } _%> @@ -26,15 +26,15 @@ public class <%= persistClass %>IntegrationTestSamplesBuilder { <%_ } _%> Supplier<<%= persistClass %>> insertCallback = () -> { - <%= persistClass %>Repository <%= persistInstance %>Repository = applicationContext.getBean(<%= persistClass %>Repository.class); - <%= persistClass %> persisted = <%= persistInstance %>Repository.save(<%= persistClass %>TestSamples.build<%= persistClass %>InsertableSample1()); + <%= entityClass %>Repository <%= entityInstance %>Repository = applicationContext.getBean(<%= entityClass %>Repository.class); + <%= persistClass %> persisted = <%= entityInstance %>Repository.save(<%= persistClass %>TestSamples.build<%= persistClass %>InsertableSample1()); return <%= persistClass %>TestSamples.clone(persisted); }; Consumer<<%= persistClass %>> tearDownCallback = (<%= persistClass %> inserted) -> { - <%= persistClass %>Repository <%= persistInstance %>Repository = applicationContext.getBean(<%= persistClass %>Repository.class); - <%= persistInstance %>Repository.delete(inserted); + <%= entityClass %>Repository <%= entityInstance %>Repository = applicationContext.getBean(<%= entityClass %>Repository.class); + <%= entityInstance %>Repository.delete(inserted); tearDownCallbacks.forEach((IntegrationTestSample integrationTestSample) -> { integrationTestSample.tearDown();