use of org.springframework.expression.TypeLocator in project spring-security by spring-projects.
the class DelegatingEvaluationContextTests method getTypeLocator.
@Test
public void getTypeLocator() {
TypeLocator expected = mock(TypeLocator.class);
when(this.delegate.getTypeLocator()).thenReturn(expected);
assertThat(this.context.getTypeLocator()).isEqualTo(expected);
}
use of org.springframework.expression.TypeLocator in project spring-framework by spring-projects.
the class StandardComponentsTests method testStandardEvaluationContext.
@Test
public void testStandardEvaluationContext() {
StandardEvaluationContext context = new StandardEvaluationContext();
assertNotNull(context.getTypeComparator());
TypeComparator tc = new StandardTypeComparator();
context.setTypeComparator(tc);
assertEquals(tc, context.getTypeComparator());
TypeLocator tl = new StandardTypeLocator();
context.setTypeLocator(tl);
assertEquals(tl, context.getTypeLocator());
}
Aggregations