use of utilities.mocks.VelocityMockComponent in project Plan by plan-player-analytics.
the class VelocitySystemTest method velocityEnables.
@Test
void velocityEnables(@TempDir Path temp) throws Exception {
PlanSystem velocitySystem = new VelocityMockComponent(temp).getPlanSystem();
try {
PlanConfig config = velocitySystem.getConfigSystem().getConfig();
config.set(WebserverSettings.PORT, TEST_PORT_NUMBER);
config.set(ProxySettings.IP, "8.8.8.8");
DBSystem dbSystem = velocitySystem.getDatabaseSystem();
SQLiteDB db = dbSystem.getSqLiteFactory().usingDefaultFile();
db.setTransactionExecutorServiceProvider(MoreExecutors::newDirectExecutorService);
dbSystem.setActiveDatabase(db);
velocitySystem.enable();
assertTrue(velocitySystem.isEnabled());
} finally {
velocitySystem.disable();
}
}
Aggregations