mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 19:59:05 +01:00
Identity manager hooks. #209
This commit is contained in:
@@ -41,6 +41,7 @@ import org.briarproject.data.DataModule;
|
||||
import org.briarproject.db.DatabaseModule;
|
||||
import org.briarproject.event.EventModule;
|
||||
import org.briarproject.forum.ForumModule;
|
||||
import org.briarproject.identity.IdentityModule;
|
||||
import org.briarproject.messaging.MessagingModule;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -64,6 +65,8 @@ import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class ConstantsTest extends BriarTestCase {
|
||||
|
||||
// TODO: Break this up into tests that are relevant for each package
|
||||
|
||||
private final CryptoComponent crypto;
|
||||
private final GroupFactory groupFactory;
|
||||
private final AuthorFactory authorFactory;
|
||||
@@ -76,7 +79,7 @@ public class ConstantsTest extends BriarTestCase {
|
||||
new TestLifecycleModule(), new TestSystemModule(),
|
||||
new ContactModule(), new CryptoModule(), new DatabaseModule(),
|
||||
new DataModule(), new EventModule(), new ForumModule(),
|
||||
new MessagingModule(), new SyncModule());
|
||||
new IdentityModule(), new MessagingModule(), new SyncModule());
|
||||
crypto = i.getInstance(CryptoComponent.class);
|
||||
groupFactory = i.getInstance(GroupFactory.class);
|
||||
authorFactory = i.getInstance(AuthorFactory.class);
|
||||
|
||||
@@ -123,7 +123,8 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
|
||||
db.addTransport(transportId, MAX_LATENCY);
|
||||
// Add an identity for Alice
|
||||
LocalAuthor aliceAuthor = new LocalAuthor(aliceId, "Alice",
|
||||
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100], timestamp);
|
||||
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[123], timestamp,
|
||||
LocalAuthor.Status.ADDING);
|
||||
identityManager.addLocalAuthor(aliceAuthor);
|
||||
// Add Bob as a contact
|
||||
Author bobAuthor = new Author(bobId, "Bob",
|
||||
@@ -188,7 +189,8 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
|
||||
db.addTransport(transportId, MAX_LATENCY);
|
||||
// Add an identity for Bob
|
||||
LocalAuthor bobAuthor = new LocalAuthor(bobId, "Bob",
|
||||
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100], timestamp);
|
||||
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[123], timestamp,
|
||||
LocalAuthor.Status.ADDING);
|
||||
identityManager.addLocalAuthor(bobAuthor);
|
||||
// Add Alice as a contact
|
||||
Author aliceAuthor = new Author(aliceId, "Alice",
|
||||
|
||||
Reference in New Issue
Block a user