Package jodd.typeconverter.impl

Examples of jodd.typeconverter.impl.StringConverter


  /**
   * Registers default set of converters.
   */
  @SuppressWarnings( {"UnnecessaryFullyQualifiedName"})
  public void registerDefaults() {
    register(String.class, new StringConverter());
    register(String[].class, new StringArrayConverter(this));

    IntegerConverter integerConverter = new IntegerConverter();
    register(Integer.class, integerConverter);
    register(int.class, integerConverter);
View Full Code Here


  /**
   * Registers default set of converters.
   */
  @SuppressWarnings( {"UnnecessaryFullyQualifiedName"})
  public void registerDefaults() {
    register(String.class, new StringConverter());
    register(String[].class, new StringArrayConverter(this));

    IntegerConverter integerConverter = new IntegerConverter();
    register(Integer.class, integerConverter);
    register(int.class, integerConverter);
View Full Code Here

public class StringConverterTest {

  @Test
  public void testStringConverter() {
    StringConverter stringConverter = new StringConverter();

    assertNull(stringConverter.convert(null));

    assertEquals("123", stringConverter.convert("123"));
    assertEquals("65,66", stringConverter.convert(arrb(65, 66)));
    assertEquals("Ab", stringConverter.convert(arrc('A', 'b')));
    assertEquals("One,two", stringConverter.convert(arrs("One", "two")));
    assertEquals("123", stringConverter.convert(Integer.valueOf(123)));
    assertEquals("java.lang.String", stringConverter.convert(String.class));
  }
View Full Code Here

TOP

Related Classes of jodd.typeconverter.impl.StringConverter

Copyright © 2018 www.massapicom. 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.