use of io.automatiko.engine.codegen.process.AbstractResourceGenerator in project automatiko-engine by automatiko-io.
the class ResourceGeneratorFactoryTest method testCreateQuarkus.
@Test
void testCreateQuarkus(@Mock GeneratorContext generatorContext) {
when(generatorContext.getBuildContext()).thenReturn(new QuarkusApplicationBuildContext(new AutomatikoBuildConfig(), p -> true, c -> Collections.emptyList()));
Optional<AbstractResourceGenerator> context = tested.create(generatorContext, process, MODEL_FQCN, PROCESS_FQCN, APP_CANONICAL_NAME);
assertThat(context.isPresent()).isTrue();
assertThat(context.get()).isExactlyInstanceOf(ResourceGenerator.class);
}
use of io.automatiko.engine.codegen.process.AbstractResourceGenerator in project automatiko-engine by automatiko-io.
the class ResourceGeneratorFactoryTest method testCreateQuarkusReactive.
@Test
void testCreateQuarkusReactive(@Mock GeneratorContext generatorContext) {
when(generatorContext.getApplicationProperty(GeneratorConfig.REST_RESOURCE_TYPE_PROP)).thenReturn(Optional.of("reactive"));
when(generatorContext.getBuildContext()).thenReturn(new QuarkusApplicationBuildContext(new AutomatikoBuildConfig(), p -> true, c -> Collections.emptyList()));
Optional<AbstractResourceGenerator> context = tested.create(generatorContext, process, MODEL_FQCN, PROCESS_FQCN, APP_CANONICAL_NAME);
assertThat(context.isPresent()).isTrue();
assertThat(context.get()).isExactlyInstanceOf(ReactiveResourceGenerator.class);
}
Aggregations