mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-16 04:39:54 +01:00
Add helper method for encoding authors.
This commit is contained in:
@@ -331,6 +331,18 @@ public class ClientHelperImplTest extends BrambleTestCase {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testParsesAndEncodesAuthor() throws Exception {
|
||||
context.checking(new Expectations() {{
|
||||
oneOf(authorFactory).createAuthor(author.getFormatVersion(),
|
||||
author.getName(), author.getPublicKey());
|
||||
will(returnValue(author));
|
||||
}});
|
||||
|
||||
BdfList authorList = clientHelper.toList(author);
|
||||
assertEquals(author, clientHelper.parseAndValidateAuthor(authorList));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testAcceptsValidAuthor() throws Exception {
|
||||
BdfList authorList = BdfList.of(
|
||||
|
||||
Reference in New Issue
Block a user