Search in sources :

Example 16 with DmnDataTypeTransformer

use of org.camunda.bpm.dmn.engine.impl.spi.type.DmnDataTypeTransformer in project camunda-engine-dmn by camunda.

the class DmnDataTypeTransformerTest method invalidDoubleValueForLongType.

@Test
public void invalidDoubleValueForLongType() {
    DmnDataTypeTransformer typeTransformer = registry.getTransformer("long");
    thrown.expect(IllegalArgumentException.class);
    typeTransformer.transform(4.2);
}
Also used : DmnDataTypeTransformer(org.camunda.bpm.dmn.engine.impl.spi.type.DmnDataTypeTransformer) Test(org.junit.Test) DmnEngineTest(org.camunda.bpm.dmn.engine.test.DmnEngineTest)

Example 17 with DmnDataTypeTransformer

use of org.camunda.bpm.dmn.engine.impl.spi.type.DmnDataTypeTransformer in project camunda-engine-dmn by camunda.

the class DmnDataTypeTransformerTest method invalidLongValueForIntegerType.

@Test
public void invalidLongValueForIntegerType() {
    DmnDataTypeTransformer typeTransformer = registry.getTransformer("integer");
    thrown.expect(IllegalArgumentException.class);
    typeTransformer.transform(Long.MAX_VALUE);
}
Also used : DmnDataTypeTransformer(org.camunda.bpm.dmn.engine.impl.spi.type.DmnDataTypeTransformer) Test(org.junit.Test) DmnEngineTest(org.camunda.bpm.dmn.engine.test.DmnEngineTest)

Aggregations

DmnDataTypeTransformer (org.camunda.bpm.dmn.engine.impl.spi.type.DmnDataTypeTransformer)17 DmnEngineTest (org.camunda.bpm.dmn.engine.test.DmnEngineTest)17 Test (org.junit.Test)17 TypedValue (org.camunda.bpm.engine.variable.value.TypedValue)6 Date (java.util.Date)1