Search in sources :

Example 1 with AbsoluteValue

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

the class DefaultAtlasFieldActionsServiceTest method testProcessActionWithActionActionDetailObjectAtlasExceptionNoMethod.

@Test(expected = AtlasException.class)
public void testProcessActionWithActionActionDetailObjectAtlasExceptionNoMethod() throws AtlasException {
    Action action = new AbsoluteValue();
    Object sourceObject = new Integer("1");
    ActionDetail actionDetail = new ActionDetail();
    actionDetail.setClassName("io.atlasmap.actions.NumberFieldActions");
    actionDetail.setSourceType(FieldType.NUMBER);
    // actionDetail.setMethod("absolute");
    fieldActionsService.processAction(action, actionDetail, sourceObject);
}
Also used : Action(io.atlasmap.v2.Action) AbsoluteValue(io.atlasmap.v2.AbsoluteValue) ActionDetail(io.atlasmap.v2.ActionDetail) Test(org.junit.Test)

Example 2 with AbsoluteValue

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

the class DefaultAtlasFieldActionsServiceTest method testProcessActionWithActionActionDetailObjectAtlasException.

@Test(expected = AtlasException.class)
public void testProcessActionWithActionActionDetailObjectAtlasException() throws AtlasException {
    Action action = new AbsoluteValue();
    Object sourceObject = new Integer("1");
    ActionDetail actionDetail = new ActionDetail();
    actionDetail.setClassName("io.atlasmap.actions.NumberFieldActions");
    actionDetail.setSourceType(FieldType.INTEGER);
    actionDetail.setMethod("absoluteValue");
    fieldActionsService.processAction(action, actionDetail, sourceObject);
}
Also used : Action(io.atlasmap.v2.Action) AbsoluteValue(io.atlasmap.v2.AbsoluteValue) ActionDetail(io.atlasmap.v2.ActionDetail) Test(org.junit.Test)

Aggregations

AbsoluteValue (io.atlasmap.v2.AbsoluteValue)2 Action (io.atlasmap.v2.Action)2 ActionDetail (io.atlasmap.v2.ActionDetail)2 Test (org.junit.Test)2