use of io.automatiko.engine.codegen.ConfigGenerator in project automatiko-engine by automatiko-io.
the class ConfigGeneratorTest method newInstanceTest.
private void newInstanceTest(final ProcessConfigGenerator processConfigGenerator, final Class<?> expectedArgumentType) {
ObjectCreationExpr expression = new ConfigGenerator("org.kie.kogito.test").withProcessConfig(processConfigGenerator).newInstance();
assertThat(expression).isNotNull();
assertThat(expression.getType()).isNotNull();
assertThat(expression.getType().asString()).isEqualTo("org.kie.kogito.test.ApplicationConfig");
assertThat(expression.getArguments()).isNotNull();
assertThat(expression.getArguments()).hasSize(0);
}
use of io.automatiko.engine.codegen.ConfigGenerator in project automatiko-engine by automatiko-io.
the class ConfigGeneratorTest method withProcessConfig.
@Test
public void withProcessConfig() {
final ConfigGenerator generator = new ConfigGenerator("org.kie.kogito.test");
final ProcessConfigGenerator processConfigGenerator = Mockito.mock(ProcessConfigGenerator.class);
final ConfigGenerator returnedConfigGenerator = generator.withProcessConfig(processConfigGenerator);
assertThat(returnedConfigGenerator).isNotNull();
assertThat(returnedConfigGenerator).isSameAs(generator);
}
use of io.automatiko.engine.codegen.ConfigGenerator in project automatiko-engine by automatiko-io.
the class ConfigGeneratorTest method withProcessConfigNull.
@Test
public void withProcessConfigNull() {
final ConfigGenerator generator = new ConfigGenerator("org.kie.kogito.test");
final ConfigGenerator returnedConfigGenerator = generator.withProcessConfig(null);
assertThat(returnedConfigGenerator).isNotNull();
assertThat(returnedConfigGenerator).isSameAs(generator);
}
Aggregations