Search in sources :

Example 1 with AddDays

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

the class DateFieldActionsTest method testAddDays.

@Test
public void testAddDays() {
    AddDays action = new AddDays();
    action.setDays(2);
    assertNull(DateFieldActions.addDays(action, null));
    ZonedDateTime origDate = ZonedDateTime.now();
    ZonedDateTime laterDate = origDate.plusDays(2);
    assertEquals(laterDate, DateFieldActions.addDays(action, origDate));
}
Also used : AddDays(io.atlasmap.v2.AddDays) ZonedDateTime(java.time.ZonedDateTime) Test(org.junit.Test)

Aggregations

AddDays (io.atlasmap.v2.AddDays)1 ZonedDateTime (java.time.ZonedDateTime)1 Test (org.junit.Test)1