Example usage for org.springframework.expression TypedValue getValue

List of usage examples for org.springframework.expression TypedValue getValue

Introduction

In this page you can find the example usage for org.springframework.expression TypedValue getValue.

Prototype

@Nullable
    public Object getValue() 

Source Link

Usage

From source file:it.geosolutions.opensdi2.workflow.transform.spel.accessors.SimpleFeaturePropertyAccessorTest.java

@Test
public void testAccessorReadsProperty() throws AccessException {
    TypedValue value = accessor.read(ctx, feature, "prop0");
    assertNotNull(value.getValue());
    assertEquals("value0", value.getValue());
}

From source file:it.geosolutions.opensdi2.workflow.transform.spel.accessors.SimpleFeaturePropertyAccessorTest.java

@Test
public void testAccessorReadsNumericProperty() throws AccessException {
    TypedValue value = accessor.read(ctx, feature, "prop1");
    assertNotNull(value.getValue());
    assertEquals(100.0, value.getValue());
}

From source file:it.geosolutions.opensdi2.workflow.transform.spel.accessors.SimpleFeaturePropertyAccessorTest.java

@Test
public void testAccessorReadsGeometry() throws AccessException {
    TypedValue value = accessor.read(ctx, feature, "geometry");
    assertNotNull(value.getValue());
    assertTrue(value.getValue() instanceof Geometry);
}

From source file:org.echocat.redprecursor.annotations.utils.AccessAlsoProtectedMembersReflectivePropertyAccessorUnitTest.java

private Matcher<TypedValue> returnsValue(@Nonnull final Object value) {
    requireNonNull("value", value);
    return new TypeSafeMatcher<TypedValue>() {
        @Override//from w w  w  . j a v a2s.  c  om
        public boolean matchesSafely(TypedValue item) {
            return item != null && value.equals(item.getValue());
        }

        @Override
        public void describeTo(Description description) {
            description.appendText("is ").appendValue(value);
        }
    };
}