use of io.micronaut.starter.options.TestRockerModelProvider in project micronaut-starter by micronaut-projects.
the class AwsAlexa method cancelIntentHandlerTest.
private void cancelIntentHandlerTest(GeneratorContext generatorContext, Project project) {
String cancelIntentHandlerTest = generatorContext.getTestSourcePath("/{packagePath}/CancelIntentHandler");
TestRockerModelProvider provider = new DefaultTestRockerModelProvider(cancelIntentHandlerGroovySpock.template(project), cancelIntentHandlerJavaJunit.template(project), cancelIntentHandlerGroovyJunit.template(project), cancelIntentHandlerKotlinJunit.template(project), cancelIntentHandlerKoTest.template(project));
generatorContext.addTemplate("testCancelIntentHandler", cancelIntentHandlerTest, provider);
}
use of io.micronaut.starter.options.TestRockerModelProvider in project micronaut-starter by micronaut-projects.
the class AwsAlexa method fallbackIntentHandlerTest.
private void fallbackIntentHandlerTest(GeneratorContext generatorContext, Project project) {
String fallbackIntentHandlerTest = generatorContext.getTestSourcePath("/{packagePath}/FallbackIntentHandler");
TestRockerModelProvider provider = new DefaultTestRockerModelProvider(fallbackIntentHandlerGroovySpock.template(project), fallbackIntentHandlerJavaJunit.template(project), fallbackIntentHandlerGroovyJunit.template(project), fallbackIntentHandlerKotlinJunit.template(project), fallbackIntentHandlerKoTest.template(project));
generatorContext.addTemplate("testFallbackIntentHandler", fallbackIntentHandlerTest, provider);
}
use of io.micronaut.starter.options.TestRockerModelProvider in project micronaut-starter by micronaut-projects.
the class AwsAlexa method helpIntentHandlerTest.
private void helpIntentHandlerTest(GeneratorContext generatorContext, Project project) {
String helpIntentHandlerTest = generatorContext.getTestSourcePath("/{packagePath}/HelpIntentHandler");
TestRockerModelProvider provider = new DefaultTestRockerModelProvider(helpIntentHandlerGroovySpock.template(project), helpIntentHandlerJavaJunit.template(project), helpIntentHandlerGroovyJunit.template(project), helpIntentHandlerKotlinJunit.template(project), helpIntentHandlerKoTest.template(project));
generatorContext.addTemplate("testHelpIntentHandler", helpIntentHandlerTest, provider);
}
use of io.micronaut.starter.options.TestRockerModelProvider in project micronaut-starter by micronaut-projects.
the class AbstractFunctionFeature method applyTestTemplate.
protected void applyTestTemplate(GeneratorContext generatorContext, Project project, String name) {
String testSource = generatorContext.getTestSourcePath("/{packagePath}/" + name);
TestRockerModelProvider provider = new DefaultTestRockerModelProvider(spockTemplate(project), javaJUnitTemplate(project), groovyJUnitTemplate(project), kotlinJUnitTemplate(project), koTestTemplate(project));
generatorContext.addTemplate("testFunction", testSource, provider);
}
use of io.micronaut.starter.options.TestRockerModelProvider 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)));
}
}
Aggregations