コード例 #1
0
 @Test
 public void shouldMatchIfHasAnnotationOnMethod() throws Exception {
   TypeDescriptor targetType = AnnotatedClass.getMethodParamTypeDescriptor();
   assertTrue(converter.matches(sourceType, targetType));
 }
コード例 #2
0
 @Test
 public void shouldMatchIfConverterExists() throws Exception {
   TypeDescriptor targetType = TypeDescriptor.valueOf(ClassWithConverter.class);
   assertTrue(converter.matches(sourceType, targetType));
 }
コード例 #3
0
 @Test
 public void shouldNotMatchIfNotSpringFacesContext() throws Exception {
   SpringFacesContextSetter.setCurrentInstance(null);
   assertFalse(converter.matches(sourceType, TypeDescriptor.valueOf(Object.class)));
 }