@Test public void shouldMatchIfHasAnnotationOnMethod() throws Exception { TypeDescriptor targetType = AnnotatedClass.getMethodParamTypeDescriptor(); assertTrue(converter.matches(sourceType, targetType)); }
@Test public void shouldMatchIfConverterExists() throws Exception { TypeDescriptor targetType = TypeDescriptor.valueOf(ClassWithConverter.class); assertTrue(converter.matches(sourceType, targetType)); }
@Test public void shouldNotMatchIfNotSpringFacesContext() throws Exception { SpringFacesContextSetter.setCurrentInstance(null); assertFalse(converter.matches(sourceType, TypeDescriptor.valueOf(Object.class))); }