|
1 | 1 | /* Copyright (c) 2013-2020 VMware, Inc. or its affiliates. All rights reserved. */ |
2 | 2 | package com.rabbitmq.integration.tests; |
3 | 3 |
|
| 4 | +import static org.assertj.core.api.Assertions.assertThat; |
4 | 5 | import static org.junit.jupiter.api.Assertions.assertArrayEquals; |
5 | 6 | import static org.junit.jupiter.api.Assertions.assertEquals; |
6 | 7 | import static org.junit.jupiter.api.Assertions.assertNotNull; |
|
22 | 23 | import javax.jms.Session; |
23 | 24 | import javax.jms.TextMessage; |
24 | 25 |
|
| 26 | +import org.assertj.core.api.Assertions; |
25 | 27 | import org.junit.jupiter.api.Test; |
26 | 28 |
|
27 | 29 | import com.rabbitmq.client.AMQP; |
@@ -187,6 +189,7 @@ public void testSendFromAmqpAndReceiveBytesMessage() throws Exception { |
187 | 189 |
|
188 | 190 | assertEquals(STRING_PROP_VALUE, message.getStringProperty(USER_STRING_PROPERTY_NAME), "String property not transferred"); |
189 | 191 | assertEquals("42", message.getStringProperty("DummyProp"), "Numeric property not transferred"); |
| 192 | + assertThat(message.getJMSTimestamp()).isZero(); |
190 | 193 | } |
191 | 194 |
|
192 | 195 | @Test |
@@ -238,6 +241,7 @@ public void testSendFromAmqpAndReceiveTextMessage() throws Exception { |
238 | 241 |
|
239 | 242 | assertEquals(STRING_PROP_VALUE, message.getStringProperty(USER_STRING_PROPERTY_NAME), "String property not transferred"); |
240 | 243 | assertEquals("42", message.getStringProperty("DummyProp"), "Numeric property not transferred"); |
| 244 | + assertThat(message.getJMSTimestamp()).isZero(); |
241 | 245 | } |
242 | 246 |
|
243 | 247 | @Test |
@@ -274,6 +278,7 @@ public void testSendFromJmsAndReceiveJmsTextMessage() throws Exception { |
274 | 278 | assertNotNull(message, "No message received"); |
275 | 279 | assertEquals(MESSAGE, message.getText(), "Payload doesn't match"); |
276 | 280 | assertEquals(STRING_PROP_VALUE, message.getStringProperty(USER_STRING_PROPERTY_NAME), "String property not transferred"); |
| 281 | + assertThat(message.getJMSTimestamp()).isGreaterThan(0); |
277 | 282 | } |
278 | 283 |
|
279 | 284 | } |
0 commit comments