Separate the crypto executor into its own module.

This allows it to be replaced for testing.
This commit is contained in:
akwizgran
2018-04-17 12:13:02 +01:00
parent 6942a368d4
commit 57a6c8cb3a
14 changed files with 252 additions and 152 deletions

View File

@@ -0,0 +1,21 @@
package org.briarproject.bramble.test;
import org.briarproject.bramble.api.crypto.CryptoExecutor;
import java.util.concurrent.Executor;
import javax.inject.Singleton;
import dagger.Module;
import dagger.Provides;
@Module
public class TestCryptoExecutorModule {
@Provides
@Singleton
@CryptoExecutor
Executor provideCryptoExecutor() {
return new ImmediateExecutor();
}
}