@Test void testStringEvaluatorLookupAttributeAndConvertFromStringToLong() { Attribute amd = mock(Attribute.class); when(amd.getDataType()).thenReturn(LONG); when(amd.getExpression()).thenReturn("String"); assertEquals(12L, new StringExpressionEvaluator(amd, entityType).evaluate(entity)); }
@Override public Object evaluate(Entity entity) { Object o = entity.get(sourceAttribute.getName()); return DataConverter.convert(o, targetAttribute); }
StringExpressionEvaluator implements ExpressionEvaluator { @Override public Object evaluate(Entity entity) { Object o = entity.get(sourceAttribute.getName()); return DataConverter.convert(o, targetAttribute); } }
StringExpressionEvaluator implements ExpressionEvaluator { @Override public Object evaluate(Entity entity) { Object o = entity.get(sourceAttribute.getName()); return DataConverter.convert(o, targetAttribute); } StringExpressionEvaluator(Attribute attribute, EntityType entityType); }
StringExpressionEvaluator implements ExpressionEvaluator { @Override public Object evaluate(Entity entity) { Object o = entity.get(sourceAttribute.getName()); return DataConverter.convert(o, targetAttribute); } StringExpressionEvaluator(Attribute attribute, EntityType entityType); @Override Object evaluate(Entity entity); }
StringExpressionEvaluator implements ExpressionEvaluator { @Override public Object evaluate(Entity entity) { Object o = entity.get(sourceAttribute.getName()); return DataConverter.convert(o, targetAttribute); } StringExpressionEvaluator(Attribute attribute, EntityType entityType); @Override Object evaluate(Entity entity);  }