use of io.micronaut.starter.options.TestRockerModelProvider in project micronaut-starter by micronaut-projects.
the class JavaApplication method apply.
@Override
public void apply(GeneratorContext generatorContext) {
JavaApplicationFeature.super.apply(generatorContext);
if (shouldGenerateApplicationFile(generatorContext)) {
generatorContext.addTemplate("application", new RockerTemplate(getPath(), application.template(generatorContext.getProject(), generatorContext.getFeatures())));
TestFramework testFramework = generatorContext.getTestFramework();
String testSourcePath = generatorContext.getTestSourcePath("/{packagePath}/{className}");
Project project = generatorContext.getProject();
TestRockerModelProvider provider = new DefaultTestRockerModelProvider(spock.template(project), javaJunit.template(project), javaJunit.template(project), javaJunit.template(project), koTest.template(project));
generatorContext.addTemplate("applicationTest", new RockerTemplate(testSourcePath, provider.findModel(generatorContext.getLanguage(), testFramework)));
}
}
Aggregations