Remove raw representation from Message class.

This commit is contained in:
akwizgran
2018-08-24 18:11:32 +01:00
parent de63141997
commit 74e4a9cbdf
32 changed files with 180 additions and 130 deletions

View File

@@ -12,10 +12,8 @@ import org.jmock.Expectations;
import org.junit.Test;
import static org.briarproject.bramble.api.sync.SyncConstants.MAX_MESSAGE_BODY_LENGTH;
import static org.briarproject.bramble.api.sync.SyncConstants.MAX_MESSAGE_LENGTH;
import static org.briarproject.bramble.test.TestUtils.getAuthor;
import static org.briarproject.bramble.test.TestUtils.getMessage;
import static org.briarproject.bramble.test.TestUtils.getRandomBytes;
import static org.briarproject.bramble.test.TestUtils.getRandomId;
import static org.briarproject.bramble.util.StringUtils.getRandomString;
import static org.briarproject.briar.api.introduction.IntroductionConstants.MAX_REQUEST_MESSAGE_LENGTH;
@@ -30,9 +28,10 @@ public class MessageEncoderTest extends BrambleMockTestCase {
new MessageEncoderImpl(clientHelper, messageFactory);
private final GroupId groupId = new GroupId(getRandomId());
private final Message message = getMessage(groupId, MAX_MESSAGE_LENGTH);
private final Message message =
getMessage(groupId, MAX_MESSAGE_BODY_LENGTH);
private final long timestamp = message.getTimestamp();
private final byte[] body = getRandomBytes(MAX_MESSAGE_BODY_LENGTH);
private final byte[] body = message.getBody();
private final Author author = getAuthor();
private final BdfList authorList = new BdfList();
private final String text = getRandomString(MAX_REQUEST_MESSAGE_LENGTH);