Search in sources :

Example 1 with RedisConnector

use of io.vertigo.commons.impl.connectors.redis.RedisConnector in project vertigo by KleeGroup.

the class AccountManagerTest method setUp.

@Before
public void setUp() {
    app = new AutoCloseableApp(MyAppConfig.config(redis, database));
    DIInjector.injectMembers(this, app.getComponentSpace());
    if (redis) {
        final RedisConnector redisConnector = app.getComponentSpace().resolve(RedisConnector.class);
        try (final Jedis jedis = redisConnector.getResource()) {
            jedis.flushAll();
        }
    }
    if (database) {
        CreateTestDataBase.initMainStore();
    }
    accountURI0 = createAccountURI("0");
    accountURI1 = createAccountURI("1");
    accountURI2 = createAccountURI("2");
    groupURI = createGroupURI("100");
    groupAllURI = createGroupURI("ALL");
}
Also used : AutoCloseableApp(io.vertigo.app.AutoCloseableApp) Jedis(redis.clients.jedis.Jedis) RedisConnector(io.vertigo.commons.impl.connectors.redis.RedisConnector) Before(org.junit.Before)

Aggregations

AutoCloseableApp (io.vertigo.app.AutoCloseableApp)1 RedisConnector (io.vertigo.commons.impl.connectors.redis.RedisConnector)1 Before (org.junit.Before)1 Jedis (redis.clients.jedis.Jedis)1