@Test public void shouldMapSendOperationAttribute() throws JMSException { MappedApi service = service(new MappingBuilder("myop").build()); // When service.mappedNoArgCall(); // Then MapMessage message = (MapMessage) captureMessage(); assertEquals("mappedNoArgCall", message.getObject("myop")); }
@Test public void shouldMapSendAttributes() throws JMSException { // Given MappedApi proxy = MessageSender.of(MappedApi.class); // When proxy.mappedCall("a", 0L); // Then MapMessage message = (MapMessage) captureMessage(); assertEquals("a", message.getObject("A")); assertEquals("0", message.getObject("B")); }
@Test public void shouldMapSendOperationName() throws JMSException { // Given Mapping mapping = new MappingBuilder(OPERATION_FIELD_NAME) // .mapOperation("mappedNoArgCall", "MAPPED_NOARG_OP") .build(); MappedApi service = service(mapping); // When service.mappedNoArgCall(); // Then MapMessage message = (MapMessage) captureMessage(); assertEquals("MAPPED_NOARG_OP", message.getObject(OPERATION_FIELD_NAME)); }