Include creation time in LocalAuthor.

This allows the oldest LocalAuthor to be used as the default.
This commit is contained in:
akwizgran
2014-02-10 12:14:09 +00:00
parent 55492dd448
commit 71a31c2a7a
6 changed files with 34 additions and 16 deletions

View File

@@ -86,7 +86,7 @@ public abstract class DatabaseComponentTest extends BriarTestCase {
author = new Author(authorId, "Alice", new byte[MAX_PUBLIC_KEY_LENGTH]);
localAuthorId = new AuthorId(TestUtils.getRandomId());
localAuthor = new LocalAuthor(localAuthorId, "Bob",
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100]);
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100], 1234);
messageId = new MessageId(TestUtils.getRandomId());
messageId1 = new MessageId(TestUtils.getRandomId());
contentType = "text/plain";

View File

@@ -74,7 +74,7 @@ public class H2DatabaseTest extends BriarTestCase {
author = new Author(authorId, "Alice", new byte[MAX_PUBLIC_KEY_LENGTH]);
localAuthorId = new AuthorId(TestUtils.getRandomId());
localAuthor = new LocalAuthor(localAuthorId, "Bob",
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100]);
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100], 1234);
messageId = new MessageId(TestUtils.getRandomId());
contentType = "text/plain";
subject = "Foo";

View File

@@ -114,7 +114,7 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
// Add a local pseudonym for Alice
AuthorId aliceId = new AuthorId(TestUtils.getRandomId());
LocalAuthor aliceAuthor = new LocalAuthor(aliceId, "Alice",
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100]);
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100], 1234);
db.addLocalAuthor(aliceAuthor);
// Add Bob as a contact
AuthorId bobId = new AuthorId(TestUtils.getRandomId());
@@ -173,7 +173,7 @@ public class SimplexMessagingIntegrationTest extends BriarTestCase {
// Add a local pseudonym for Bob
AuthorId bobId = new AuthorId(TestUtils.getRandomId());
LocalAuthor bobAuthor = new LocalAuthor(bobId, "Bob",
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100]);
new byte[MAX_PUBLIC_KEY_LENGTH], new byte[100], 1234);
db.addLocalAuthor(bobAuthor);
// Add Alice as a contact
AuthorId aliceId = new AuthorId(TestUtils.getRandomId());