all basic JMS tests

This commit is contained in:
Radek Davidek 2026-03-17 16:41:04 +01:00
parent 486950c2b4
commit 320bde9a39

View File

@ -39,4 +39,28 @@ public class ImqFirstVisionTest {
.withTimeout(15, TimeUnit.SECONDS).andAssertFieldValue("/request/balance", "50000");
}
@TestCase(name = "Send UTF-8 message as bytes")
public void sendUtf8BytesMessage(Harness harness) {
harness.withImqFirstVision().toQueue(ImqFirstVisionQueue.MF_UTF8).asUtf8().withPayload("DATA|12345|ÚČET|CZK")
.send();
}
@TestCase(name = "Receive UTF-8 message as bytes")
public void receiveUtf8BytesMessage(Harness harness) {
harness.withImqFirstVision().fromQueue(ImqFirstVisionQueue.MF_UTF8).asUtf8()
.receiveWhere(msg -> msg.getBody().contains("12345")).withTimeout(15, TimeUnit.SECONDS);
}
@TestCase(name = "Send EBCDIC message as bytes")
public void sendEbcdicBytesMessage(Harness harness) {
harness.withImqFirstVision().toQueue(ImqFirstVisionQueue.MF_EBCDIC).asEbcdic()
.withPayload("PŘIKAZ|12345|ZŮSTATEK|CZK").send();
}
@TestCase(name = "Receive EBCDIC message as bytes")
public void receiveEbcdicBytesMessage(Harness harness) {
harness.withImqFirstVision().fromQueue(ImqFirstVisionQueue.MF_EBCDIC).asEbcdic()
.receiveWhere(msg -> msg.getBody().contains("12345")).withTimeout(15, TimeUnit.SECONDS);
}
}