use of io.bootique.BQRuntime in project bootique-mvc by bootique.
the class MvcMustacheModuleProviderTest method testModuleDeclaresDependencies.
@Test
public void testModuleDeclaresDependencies() {
final BQRuntime bqRuntime = testFactory.app().module(new MvcMustacheModuleProvider()).createRuntime();
BQRuntimeChecker.testModulesLoaded(bqRuntime, JerseyModule.class, MvcModule.class, MvcMustacheModule.class);
}
use of io.bootique.BQRuntime in project bootique-mvc by bootique.
the class MvcModuleProviderTest method testModuleDeclaresDependencies.
@Test
public void testModuleDeclaresDependencies() {
final BQRuntime bqRuntime = testFactory.app().module(new MvcModuleProvider()).createRuntime();
BQRuntimeChecker.testModulesLoaded(bqRuntime, JerseyModule.class, MvcModule.class);
}
use of io.bootique.BQRuntime in project bootique-linkmove by bootique.
the class LinkMoveModuleProviderIT method testModuleDeclaresDependencies.
@Test
public void testModuleDeclaresDependencies() {
final BQRuntime bqRuntime = testFactory.app().module(new LinkMoveModuleProvider()).createRuntime();
BQRuntimeChecker.testModulesLoaded(bqRuntime, JdbcModule.class, LinkMoveModule.class, CayenneModule.class);
}
use of io.bootique.BQRuntime in project tutorials by eugenp.
the class AppTest method givenService_expectBoolen.
@Test
public void givenService_expectBoolen() {
BQRuntime runtime = bqTestFactory.app("--server").autoLoadModules().createRuntime();
HelloService service = runtime.getInstance(HelloService.class);
assertEquals(true, service.save());
}
use of io.bootique.BQRuntime in project bootique-jdbc by bootique.
the class HikariCPInstrumentedModuleIT method testHealthChecksMultipleDs.
@Test
public void testHealthChecksMultipleDs() throws SQLException {
BQRuntime runtime = TEST_FACTORY.app("-c", "classpath:io/bootique/jdbc/instrumented/hikaricp/hikaricp-ds2-health.yml").autoLoadModules().createRuntime();
DataSourceFactory factory = runtime.getInstance(DataSourceFactory.class);
String derby2 = "derby2", derby3 = "derby3";
HikariDataSource ds2 = (HikariDataSource) factory.forName(derby2);
assertNotNull(ds2);
HikariDataSource ds3 = (HikariDataSource) factory.forName(derby3);
assertNotNull(ds3);
HealthCheckRegistry registry = runtime.getInstance(HealthCheckRegistry.class);
assertTrue(registry.containsHealthCheck(ConnectivityCheck.healthCheckName(derby2)));
assertTrue(registry.containsHealthCheck(Connection99PercentCheck.healthCheckName(derby2)));
/**
* embedded health check {@link io.bootique.jdbc.instrumented.healthcheck.DataSourceHealthCheck}
*/
assertTrue(registry.containsHealthCheck(DataSourceHealthCheck.healthCheckName(derby2)));
assertTrue(registry.containsHealthCheck(ConnectivityCheck.healthCheckName(derby3)));
assertTrue(registry.containsHealthCheck(Connection99PercentCheck.healthCheckName(derby3)));
/**
* embedded health check {@link io.bootique.jdbc.instrumented.healthcheck.DataSourceHealthCheck}
*/
assertTrue(registry.containsHealthCheck(DataSourceHealthCheck.healthCheckName(derby3)));
Map<String, HealthCheckOutcome> results = registry.runHealthChecks();
assertEquals(results.size(), 6);
}
Aggregations