use of io.micronaut.starter.options.TestFramework in project micronaut-starter by micronaut-projects.
the class GroovyApplication method apply.
@Override
public void apply(GeneratorContext generatorContext) {
GroovyApplicationFeature.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), groovyJunit.template(project), groovyJunit.template(project), groovyJunit.template(project), koTest.template(project));
generatorContext.addTemplate("applicationTest", new RockerTemplate(testSourcePath, provider.findModel(generatorContext.getLanguage(), testFramework)));
}
}
use of io.micronaut.starter.options.TestFramework in project micronaut-starter by micronaut-projects.
the class KotlinApplication method apply.
@Override
public void apply(GeneratorContext generatorContext) {
KotlinApplicationFeature.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), kotlinJunit.template(project), kotlinJunit.template(project), kotlinJunit.template(project), koTest.template(project));
generatorContext.addTemplate("applicationTest", new RockerTemplate(testSourcePath, provider.findModel(generatorContext.getLanguage(), testFramework)));
}
}
use of io.micronaut.starter.options.TestFramework 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