use of com.kixeye.chassis.transport.dto.Envelope in project chassis by Kixeye.
the class WebSocketEnvelopeTest method testWithNoPayload.
@Test
public void testWithNoPayload() {
final Envelope baseEnvelope = new Envelope(RandomStringUtils.randomAlphaNumericString(20, RAND), RandomStringUtils.randomAlphaNumericString(20, RAND), RandomStringUtils.randomAlphaNumericString(20, RAND), null, null);
final WebSocketEnvelope envelope = new WebSocketEnvelope(baseEnvelope);
Assert.assertEquals(baseEnvelope.action, envelope.getAction());
Assert.assertEquals(baseEnvelope.typeId, envelope.getTypeId());
Assert.assertEquals(baseEnvelope.transactionId, envelope.getTransactionId());
Assert.assertFalse(envelope.hasPayload());
Assert.assertEquals(baseEnvelope.payload, envelope.getPayload());
}
Aggregations