コード例 #1
0
  @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"));
  }
コード例 #2
0
  @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));
  }