public void testSendMessageWithDelaysMapWhenResponseIs2xx() throws Exception { HttpResponse sendMessageResponse = HttpResponse.builder() .statusCode(200) .payload(payloadFromResourceWithContentType("/send_message_batch.xml", "text/xml")).build(); SQSApi apiWhenExist = requestSendsResponse(sendMessageWithDelaysMap, sendMessageResponse); assertEquals( apiWhenExist.getMessageApiForQueue(queue).sendWithDelays(ImmutableMap.of("payload1", 1, "payload2", 10)) .toString(), new SendMessageBatchResponseTest().expected().toString()); }
public void testSendMessageWithDelaysMapWhenResponseIs2xx() throws Exception { HttpResponse sendMessageResponse = HttpResponse.builder() .statusCode(200) .payload(payloadFromResourceWithContentType("/send_message_batch.xml", "text/xml")).build(); SQSApi apiWhenExist = requestSendsResponse(sendMessageWithDelaysMap, sendMessageResponse); assertEquals( apiWhenExist.getMessageApiForQueue(queue).sendWithDelays(ImmutableMap.of("payload1", 1, "payload2", 10)) .toString(), new SendMessageBatchResponseTest().expected().toString()); }
public void testSendMessageWithDelaysTableWhenResponseIs2xx() throws Exception { HttpResponse sendMessageResponse = HttpResponse.builder() .statusCode(200) .payload(payloadFromResourceWithContentType("/send_message_batch.xml", "text/xml")).build(); SQSApi apiWhenExist = requestSendsResponse(sendMessageWithDelaysTable, sendMessageResponse); assertEquals(apiWhenExist.getMessageApiForQueue(queue).sendWithDelays(ImmutableTable.<String, String, Integer>builder() .put("foo1", "payload1", 1) .put("foo2", "payload2", 10) .build()) .toString(), new SendMessageBatchResponseTest().expected().toString()); }
public void testSendMessageWithDelaysTableWhenResponseIs2xx() throws Exception { HttpResponse sendMessageResponse = HttpResponse.builder() .statusCode(200) .payload(payloadFromResourceWithContentType("/send_message_batch.xml", "text/xml")).build(); SQSApi apiWhenExist = requestSendsResponse(sendMessageWithDelaysTable, sendMessageResponse); assertEquals(apiWhenExist.getMessageApiForQueue(queue).sendWithDelays(ImmutableTable.<String, String, Integer>builder() .put("foo1", "payload1", 1) .put("foo2", "payload2", 10) .build()) .toString(), new SendMessageBatchResponseTest().expected().toString()); }