Beispiel #1
0
  @Test
  public void shouldHandleColumns() throws Exception {
    output.expectedMessageCount(1);

    template.sendBody(
        "direct:headers",
        Arrays.<Map>asList(
            TestUtils.asMap("A", "1", "B", "2", "C", "3"),
            TestUtils.asMap("A", "one", "B", "two", "C", "three")));
    output.assertIsSatisfied();

    assertArrayEquals(new String[] {"A,C", "1,3", "one,three"}, readOutputLines());
  }
Beispiel #2
0
  @Test
  public void shouldMarshalSingleMap() throws Exception {
    output.expectedMessageCount(1);

    template.sendBody("direct:default", TestUtils.asMap("A", "1", "B", "2", "C", "3"));
    output.assertIsSatisfied();

    assertArrayEquals(new String[] {"1,2,3"}, readOutputLines());
  }