Package org.springframework.core.convert.support

Examples of org.springframework.core.convert.support.GenericConversionService.canConvert()


  @Test
  public void customConversionServiceFailure() throws Exception {
    DefaultMessageHandlerMethodFactory instance = createInstance();
    GenericConversionService conversionService = new GenericConversionService();
    assertFalse("conversion service should fail to convert payload",
        conversionService.canConvert(Integer.class, String.class));
    instance.setConversionService(conversionService);
    instance.afterPropertiesSet();

    InvocableHandlerMethod invocableHandlerMethod =
        createInvocableHandlerMethod(instance, "simpleString", String.class);
View Full Code Here


    GenericConversionService conversionService = new DefaultConversionService();

    CustomConversions conversions = new CustomConversions(Arrays.asList(StringToFormatConverter.INSTANCE));
    conversions.registerConvertersIn(conversionService);

    assertThat(conversionService.canConvert(String.class, Format.class), is(true));
  }

  /**
   * @see DATAMONGO-259
   */
 
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.