mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-14 11:49:04 +01:00
Rename account to identity.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package org.briarproject.briar.feed;
|
||||
|
||||
import org.briarproject.bramble.api.identity.Account;
|
||||
import org.briarproject.bramble.api.identity.Identity;
|
||||
import org.briarproject.bramble.api.identity.IdentityManager;
|
||||
import org.briarproject.bramble.api.lifecycle.LifecycleManager;
|
||||
import org.briarproject.bramble.contact.ContactModule;
|
||||
@@ -51,8 +51,8 @@ public class FeedManagerIntegrationTest extends BriarTestCase {
|
||||
injectEagerSingletons(component);
|
||||
|
||||
IdentityManager identityManager = component.getIdentityManager();
|
||||
Account account = identityManager.createAccount("feedTest");
|
||||
identityManager.registerAccount(account);
|
||||
Identity identity = identityManager.createIdentity("feedTest");
|
||||
identityManager.registerIdentity(identity);
|
||||
|
||||
lifecycleManager = component.getLifecycleManager();
|
||||
lifecycleManager.startServices(getSecretKey());
|
||||
|
||||
@@ -5,8 +5,8 @@ import org.briarproject.bramble.api.contact.ContactManager;
|
||||
import org.briarproject.bramble.api.crypto.SecretKey;
|
||||
import org.briarproject.bramble.api.event.Event;
|
||||
import org.briarproject.bramble.api.event.EventListener;
|
||||
import org.briarproject.bramble.api.identity.Account;
|
||||
import org.briarproject.bramble.api.identity.Author;
|
||||
import org.briarproject.bramble.api.identity.Identity;
|
||||
import org.briarproject.bramble.api.identity.IdentityManager;
|
||||
import org.briarproject.bramble.api.lifecycle.LifecycleManager;
|
||||
import org.briarproject.bramble.api.nullsafety.NotNullByDefault;
|
||||
@@ -75,14 +75,14 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
|
||||
@Test
|
||||
public void testWriteAndRead() throws Exception {
|
||||
// Create the identities
|
||||
Account aliceAccount =
|
||||
alice.getIdentityManager().createAccount("Alice");
|
||||
Account bobAccount = bob.getIdentityManager().createAccount("Bob");
|
||||
Identity aliceIdentity =
|
||||
alice.getIdentityManager().createIdentity("Alice");
|
||||
Identity bobIdentity = bob.getIdentityManager().createIdentity("Bob");
|
||||
// Set up the devices and get the contact IDs
|
||||
ContactId bobId = setUp(alice, aliceAccount,
|
||||
bobAccount.getLocalAuthor(), true);
|
||||
ContactId aliceId = setUp(bob, bobAccount,
|
||||
aliceAccount.getLocalAuthor(), false);
|
||||
ContactId bobId = setUp(alice, aliceIdentity,
|
||||
bobIdentity.getLocalAuthor(), true);
|
||||
ContactId aliceId = setUp(bob, bobIdentity,
|
||||
aliceIdentity.getLocalAuthor(), false);
|
||||
// Add a private message listener
|
||||
PrivateMessageListener listener = new PrivateMessageListener();
|
||||
bob.getEventBus().addListener(listener);
|
||||
@@ -101,10 +101,10 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
|
||||
}
|
||||
|
||||
private ContactId setUp(SimplexMessagingIntegrationTestComponent device,
|
||||
Account local, Author remote, boolean alice) throws Exception {
|
||||
Identity local, Author remote, boolean alice) throws Exception {
|
||||
// Add an identity for the user
|
||||
IdentityManager identityManager = device.getIdentityManager();
|
||||
identityManager.registerAccount(local);
|
||||
identityManager.registerIdentity(local);
|
||||
// Start the lifecycle manager
|
||||
LifecycleManager lifecycleManager = device.getLifecycleManager();
|
||||
lifecycleManager.startServices(getSecretKey());
|
||||
|
||||
@@ -15,7 +15,7 @@ import org.briarproject.bramble.api.db.DatabaseComponent;
|
||||
import org.briarproject.bramble.api.db.DbException;
|
||||
import org.briarproject.bramble.api.event.Event;
|
||||
import org.briarproject.bramble.api.event.EventListener;
|
||||
import org.briarproject.bramble.api.identity.Account;
|
||||
import org.briarproject.bramble.api.identity.Identity;
|
||||
import org.briarproject.bramble.api.identity.IdentityManager;
|
||||
import org.briarproject.bramble.api.identity.LocalAuthor;
|
||||
import org.briarproject.bramble.api.lifecycle.LifecycleManager;
|
||||
@@ -275,15 +275,15 @@ public abstract class BriarIntegrationTest<C extends BriarIntegrationTestCompone
|
||||
}
|
||||
|
||||
private void createAndRegisterIdentities() {
|
||||
Account account0 = identityManager0.createAccount(AUTHOR0);
|
||||
identityManager0.registerAccount(account0);
|
||||
author0 = account0.getLocalAuthor();
|
||||
Account account1 = identityManager0.createAccount(AUTHOR1);
|
||||
identityManager1.registerAccount(account1);
|
||||
author1 = account1.getLocalAuthor();
|
||||
Account account2 = identityManager0.createAccount(AUTHOR2);
|
||||
identityManager2.registerAccount(account2);
|
||||
author2 = account2.getLocalAuthor();
|
||||
Identity identity0 = identityManager0.createIdentity(AUTHOR0);
|
||||
identityManager0.registerIdentity(identity0);
|
||||
author0 = identity0.getLocalAuthor();
|
||||
Identity identity1 = identityManager0.createIdentity(AUTHOR1);
|
||||
identityManager1.registerIdentity(identity1);
|
||||
author1 = identity1.getLocalAuthor();
|
||||
Identity identity2 = identityManager0.createIdentity(AUTHOR2);
|
||||
identityManager2.registerIdentity(identity2);
|
||||
author2 = identity2.getLocalAuthor();
|
||||
}
|
||||
|
||||
protected void addDefaultContacts() throws Exception {
|
||||
|
||||
Reference in New Issue
Block a user