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));
}