@Test public void shouldMapReceiveOperationAttibute() throws JMSException { // Given MappingBuilder myMapping = new MappingBuilder("myop"); MapMessage message = createPayload("myop", "mappedNoArgCall"); // When MapMessageDecoder.of(MappedApi.class, serviceMock, myMapping.build()).onMessage(message); // Then verify(serviceMock).mappedNoArgCall(); }
@Test @Ignore // TODO reenable public void shouldMapReceiveBoxedPrimitiveAttributesIfWrittenAsStrings( /* @Values("BOXED_PRIMITIVE_CALLS") */ SimpleServiceCall call) throws Exception { // Given MappingBuilder mapping = new MappingBuilder(OPERATION_FIELD_NAME); String operation = call.operation; String argument = call.argument; Class<?> type = call.type; Object value = call.value; mapping.mapField(argument, FieldMapping.map(argument)); MapMessage message = createPayload(OPERATION_FIELD_NAME, operation, argument, String.valueOf(value)); // When MapMessageDecoder.of(BoxedPrimitivesTestApi.class, boxedPrimitivesServiceMock, mapping.build()) .onMessage(message); // Then invoke(verify(boxedPrimitivesServiceMock), operation, type, value); }