Use namespaced strings for client IDs

This commit is contained in:
Torsten Grote
2016-11-07 19:30:23 -02:00
parent 1809943f1d
commit e96b3a8c68
48 changed files with 131 additions and 195 deletions

View File

@@ -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()),

View File

@@ -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);

View File

@@ -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);