Search in sources :

Example 1 with Prepend

use of io.atlasmap.v2.Prepend in project atlasmap by atlasmap.

the class StringComplexFieldActionsTest method testPrepend.

@Test
public void testPrepend() {
    Prepend action = new Prepend();
    assertEquals(null, StringComplexFieldActions.prepend(action, null));
    assertEquals("foo", StringComplexFieldActions.prepend(action, "foo"));
    assertEquals("1", StringComplexFieldActions.prepend(action, 1));
    action.setString("");
    assertEquals("", StringComplexFieldActions.prepend(action, null));
    assertEquals("foo", StringComplexFieldActions.prepend(action, "foo"));
    action.setString("bar");
    assertEquals("bar", StringComplexFieldActions.prepend(action, null));
    assertEquals("barfoo", StringComplexFieldActions.prepend(action, "foo"));
    assertEquals("bar1", StringComplexFieldActions.prepend(action, 1));
}
Also used : Prepend(io.atlasmap.v2.Prepend) Test(org.junit.Test)

Aggregations

Prepend (io.atlasmap.v2.Prepend)1 Test (org.junit.Test)1