Search in sources :

Example 1 with MockKeyManager

use of io.divide.client.auth.MockKeyManager in project divide by HiddenStage.

the class MockAndroidModule method additionalConfig.

@Override
protected void additionalConfig(AndroidConfig config) {
    super.additionalConfig(config);
    // ORDER MATTER
    try {
        bind(KeyManager.class).toInstance(new MockKeyManager("someKey"));
    } catch (NoSuchAlgorithmException e) {
        throw new RuntimeException(e);
    }
    bind(new TypeLiteral<DAO<TransientObject, TransientObject>>() {
    }).to(new TypeLiteral<MockLocalStorage<TransientObject, TransientObject>>() {
    }).in(Singleton.class);
}
Also used : DAO(io.divide.shared.server.DAO) TypeLiteral(com.google.inject.TypeLiteral) MockKeyManager(io.divide.client.auth.MockKeyManager) NoSuchAlgorithmException(java.security.NoSuchAlgorithmException) TransientObject(io.divide.shared.transitory.TransientObject) MockKeyManager(io.divide.client.auth.MockKeyManager) KeyManager(io.divide.shared.server.KeyManager)

Aggregations

TypeLiteral (com.google.inject.TypeLiteral)1 MockKeyManager (io.divide.client.auth.MockKeyManager)1 DAO (io.divide.shared.server.DAO)1 KeyManager (io.divide.shared.server.KeyManager)1 TransientObject (io.divide.shared.transitory.TransientObject)1 NoSuchAlgorithmException (java.security.NoSuchAlgorithmException)1