diff --git a/src/test/java/tech/jhipster/lite/cucumber/CucumberConfiguration.java b/src/test/java/tech/jhipster/lite/cucumber/CucumberConfiguration.java index 35a5b75ed75..b5ab94620f4 100644 --- a/src/test/java/tech/jhipster/lite/cucumber/CucumberConfiguration.java +++ b/src/test/java/tech/jhipster/lite/cucumber/CucumberConfiguration.java @@ -15,12 +15,18 @@ import tech.jhipster.lite.JHLiteApp; import tech.jhipster.lite.cucumber.rest.CucumberRestTestContext; import tech.jhipster.lite.project.infrastructure.secondary.FakedFileSystemProjectFilesConfiguration; +import tech.jhipster.lite.project.infrastructure.secondary.FakedJHipsterPresetsFilePropertiesConfiguration; import tech.jhipster.lite.project.infrastructure.secondary.MockedProjectFormatterConfiguration; @ActiveProfiles("test") @CucumberContextConfiguration @SpringBootTest( - classes = { JHLiteApp.class, MockedProjectFormatterConfiguration.class, FakedFileSystemProjectFilesConfiguration.class }, + classes = { + JHLiteApp.class, + MockedProjectFormatterConfiguration.class, + FakedFileSystemProjectFilesConfiguration.class, + FakedJHipsterPresetsFilePropertiesConfiguration.class, + }, webEnvironment = WebEnvironment.RANDOM_PORT ) public class CucumberConfiguration { diff --git a/src/test/java/tech/jhipster/lite/project/infrastructure/secondary/FakedJHipsterPresetsFilePropertiesConfiguration.java b/src/test/java/tech/jhipster/lite/project/infrastructure/secondary/FakedJHipsterPresetsFilePropertiesConfiguration.java new file mode 100644 index 00000000000..d5d799789a3 --- /dev/null +++ b/src/test/java/tech/jhipster/lite/project/infrastructure/secondary/FakedJHipsterPresetsFilePropertiesConfiguration.java @@ -0,0 +1,14 @@ +package tech.jhipster.lite.project.infrastructure.secondary; + +import org.springframework.boot.test.context.TestConfiguration; +import org.springframework.context.annotation.Bean; +import tech.jhipster.lite.project.domain.resource.JHipsterPresetsFile; + +@TestConfiguration +public class FakedJHipsterPresetsFilePropertiesConfiguration { + + @Bean + JHipsterPresetsFile jhipsterPresetsFile() { + return new JHipsterPresetsFile("preset.json"); + } +}