mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-15 04:18:53 +01:00
Use namespaced strings for client IDs
This commit is contained in:
@@ -85,11 +85,6 @@ public class BlogManagerImplTest extends BriarTestCase {
|
||||
message = new Message(messageId, blog1.getId(), 42, getRandomBytes(42));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testClientId() {
|
||||
assertEquals(CLIENT_ID, blogManager.getClientId());
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreateLocalState() throws DbException {
|
||||
final Transaction txn = new Transaction(null, false);
|
||||
|
||||
@@ -43,7 +43,8 @@ import static org.junit.Assert.assertSame;
|
||||
public class MessageQueueManagerImplTest extends BriarTestCase {
|
||||
|
||||
private final GroupId groupId = new GroupId(TestUtils.getRandomId());
|
||||
private final ClientId clientId = new ClientId(TestUtils.getRandomId());
|
||||
private final ClientId clientId =
|
||||
new ClientId(TestUtils.getRandomString(5));
|
||||
private final byte[] descriptor = new byte[0];
|
||||
private final Group group = new Group(groupId, clientId, descriptor);
|
||||
private final long timestamp = System.currentTimeMillis();
|
||||
|
||||
@@ -90,7 +90,7 @@ public class DatabaseComponentImplTest extends BriarTestCase {
|
||||
private final Contact contact;
|
||||
|
||||
public DatabaseComponentImplTest() {
|
||||
clientId = new ClientId(TestUtils.getRandomId());
|
||||
clientId = new ClientId(TestUtils.getRandomString(5));
|
||||
groupId = new GroupId(TestUtils.getRandomId());
|
||||
byte[] descriptor = new byte[0];
|
||||
group = new Group(groupId, clientId, descriptor);
|
||||
|
||||
@@ -81,7 +81,7 @@ public class H2DatabaseTest extends BriarTestCase {
|
||||
|
||||
public H2DatabaseTest() throws Exception {
|
||||
groupId = new GroupId(TestUtils.getRandomId());
|
||||
clientId = new ClientId(TestUtils.getRandomId());
|
||||
clientId = new ClientId(TestUtils.getRandomString(5));
|
||||
byte[] descriptor = new byte[0];
|
||||
group = new Group(groupId, clientId, descriptor);
|
||||
AuthorId authorId = new AuthorId(TestUtils.getRandomId());
|
||||
@@ -601,7 +601,7 @@ public class H2DatabaseTest extends BriarTestCase {
|
||||
List<Group> groups = new ArrayList<>();
|
||||
for (int i = 0; i < 100; i++) {
|
||||
GroupId id = new GroupId(TestUtils.getRandomId());
|
||||
ClientId clientId = new ClientId(TestUtils.getRandomId());
|
||||
ClientId clientId = new ClientId(TestUtils.getRandomString(5));
|
||||
byte[] descriptor = new byte[0];
|
||||
groups.add(new Group(id, clientId, descriptor));
|
||||
}
|
||||
|
||||
@@ -82,7 +82,7 @@ public class IntroductionManagerImplTest extends BriarTestCase {
|
||||
introducee2 =
|
||||
new Contact(contactId2, author2, localAuthorId2, true, true);
|
||||
|
||||
ClientId clientId = new ClientId(TestUtils.getRandomId());
|
||||
ClientId clientId = new ClientId(TestUtils.getRandomString(5));
|
||||
introductionGroup1 = new Group(new GroupId(TestUtils.getRandomId()),
|
||||
clientId, new byte[0]);
|
||||
introductionGroup2 = new Group(new GroupId(TestUtils.getRandomId()),
|
||||
|
||||
@@ -59,7 +59,7 @@ public class IntroductionValidatorTest extends BriarTestCase {
|
||||
|
||||
public IntroductionValidatorTest() {
|
||||
GroupId groupId = new GroupId(TestUtils.getRandomId());
|
||||
ClientId clientId = new ClientId(TestUtils.getRandomId());
|
||||
ClientId clientId = new ClientId(TestUtils.getRandomString(5));
|
||||
byte[] descriptor = TestUtils.getRandomBytes(12);
|
||||
group = new Group(groupId, clientId, descriptor);
|
||||
|
||||
|
||||
@@ -61,7 +61,8 @@ public class MessageSenderTest extends BriarTestCase {
|
||||
final Transaction txn = new Transaction(null, false);
|
||||
final Group privateGroup =
|
||||
new Group(new GroupId(TestUtils.getRandomId()),
|
||||
new ClientId(TestUtils.getRandomId()), new byte[0]);
|
||||
new ClientId(TestUtils.getRandomString(5)),
|
||||
new byte[0]);
|
||||
final SessionId sessionId = new SessionId(TestUtils.getRandomId());
|
||||
byte[] mac = TestUtils.getRandomBytes(42);
|
||||
byte[] sig = TestUtils.getRandomBytes(MAX_SIGNATURE_LENGTH);
|
||||
|
||||
@@ -36,7 +36,7 @@ public class TransportPropertyValidatorTest extends BriarTestCase {
|
||||
bdfDictionary = new BdfDictionary();
|
||||
|
||||
GroupId groupId = new GroupId(TestUtils.getRandomId());
|
||||
ClientId clientId = new ClientId(TestUtils.getRandomId());
|
||||
ClientId clientId = new ClientId(TestUtils.getRandomString(5));
|
||||
byte[] descriptor = TestUtils.getRandomBytes(12);
|
||||
group = new Group(groupId, clientId, descriptor);
|
||||
|
||||
|
||||
@@ -39,7 +39,8 @@ import static org.briarproject.api.sync.ValidationManager.State.UNKNOWN;
|
||||
|
||||
public class ValidationManagerImplTest extends BriarTestCase {
|
||||
|
||||
private final ClientId clientId = new ClientId(TestUtils.getRandomId());
|
||||
private final ClientId clientId =
|
||||
new ClientId(TestUtils.getRandomString(5));
|
||||
private final MessageId messageId = new MessageId(TestUtils.getRandomId());
|
||||
private final MessageId messageId1 = new MessageId(TestUtils.getRandomId());
|
||||
private final MessageId messageId2 = new MessageId(TestUtils.getRandomId());
|
||||
|
||||
Reference in New Issue
Block a user