mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 03:39:05 +01:00
Replace default methods with helper classes.
This is a workaround for AbstractMethodErrors thrown by on-device tests.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package org.briarproject.bramble.contact;
|
||||
|
||||
import org.briarproject.bramble.BrambleCoreEagerSingletons;
|
||||
import org.briarproject.bramble.api.Pair;
|
||||
import org.briarproject.bramble.api.contact.Contact;
|
||||
import org.briarproject.bramble.api.contact.ContactManager;
|
||||
@@ -61,11 +62,11 @@ public class ContactExchangeIntegrationTest extends BrambleTestCase {
|
||||
alice = DaggerContactExchangeIntegrationTestComponent.builder()
|
||||
.testDatabaseConfigModule(
|
||||
new TestDatabaseConfigModule(aliceDir)).build();
|
||||
alice.injectBrambleCoreEagerSingletons();
|
||||
BrambleCoreEagerSingletons.Helper.injectEagerSingletons(alice);
|
||||
bob = DaggerContactExchangeIntegrationTestComponent.builder()
|
||||
.testDatabaseConfigModule(new TestDatabaseConfigModule(bobDir))
|
||||
.build();
|
||||
bob.injectBrambleCoreEagerSingletons();
|
||||
BrambleCoreEagerSingletons.Helper.injectEagerSingletons(bob);
|
||||
// Set up the devices and get the identities
|
||||
aliceIdentity = setUp(alice, "Alice");
|
||||
bobIdentity = setUp(bob, "Bob");
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
package org.briarproject.bramble.sync;
|
||||
|
||||
import org.briarproject.bramble.BrambleCoreEagerSingletons;
|
||||
import org.briarproject.bramble.api.contact.ContactId;
|
||||
import org.briarproject.bramble.api.crypto.SecretKey;
|
||||
import org.briarproject.bramble.api.crypto.TransportCrypto;
|
||||
@@ -72,7 +73,7 @@ public class SyncIntegrationTest extends BrambleTestCase {
|
||||
|
||||
SyncIntegrationTestComponent component =
|
||||
DaggerSyncIntegrationTestComponent.builder().build();
|
||||
component.injectBrambleCoreEagerSingletons();
|
||||
BrambleCoreEagerSingletons.Helper.injectEagerSingletons(component);
|
||||
component.inject(this);
|
||||
|
||||
contactId = getContactId();
|
||||
|
||||
Reference in New Issue
Block a user