package cz.moneta.test.system.messaging.imq;

import cz.moneta.test.dsl.Harness;
import cz.moneta.test.harness.annotations.TestCase;
import cz.moneta.test.harness.annotations.TestScenario;
import cz.moneta.test.harness.endpoints.imq.ImqFirstVisionQueue;

@TestScenario(name = "IBM MQ First Vision DSL Incremental Message Building Test")
public class ImqIncrementalMessageTest {

    @TestCase(name = "Create and send message with incremental payload building")
    public void createAndSendMessageWithIncrementalPayload(Harness harness) {
        harness.withImqFirstVision().toQueue(ImqFirstVisionQueue.PAYMENT_NOTIFICATIONS).withPayload("{}")
                .addField("paymentId", "PAY-456").addField("amount", 15000).addField("currency", "CZK")
                .addField("beneficiary", new Object()).addField("beneficiary", "name", "Jan Novák")
                .addField("beneficiary", "accountNumber", "1234567890/0100").withMessageId("1234567890").send();
    }
}
