Package jodd.typeconverter.impl

Examples of jodd.typeconverter.impl.BigIntegerConverter.convert()


  @Test
  public void testConversion() {
    BigIntegerConverter bigIntegerConverter = new BigIntegerConverter();

    assertNull(bigIntegerConverter.convert(null));

    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(new BigInteger("12345")));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert("12345"));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(" 12345 "));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(Double.valueOf(12345.0D)));
View Full Code Here


  public void testConversion() {
    BigIntegerConverter bigIntegerConverter = new BigIntegerConverter();

    assertNull(bigIntegerConverter.convert(null));

    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(new BigInteger("12345")));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert("12345"));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(" 12345 "));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(Double.valueOf(12345.0D)));
    assertEquals(new BigInteger("123456789"), bigIntegerConverter.convert(Long.valueOf(123456789)));
  }
View Full Code Here

    BigIntegerConverter bigIntegerConverter = new BigIntegerConverter();

    assertNull(bigIntegerConverter.convert(null));

    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(new BigInteger("12345")));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert("12345"));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(" 12345 "));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(Double.valueOf(12345.0D)));
    assertEquals(new BigInteger("123456789"), bigIntegerConverter.convert(Long.valueOf(123456789)));
  }
}
View Full Code Here

    assertNull(bigIntegerConverter.convert(null));

    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(new BigInteger("12345")));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert("12345"));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(" 12345 "));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(Double.valueOf(12345.0D)));
    assertEquals(new BigInteger("123456789"), bigIntegerConverter.convert(Long.valueOf(123456789)));
  }
}
View Full Code Here

    assertNull(bigIntegerConverter.convert(null));

    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(new BigInteger("12345")));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert("12345"));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(" 12345 "));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(Double.valueOf(12345.0D)));
    assertEquals(new BigInteger("123456789"), bigIntegerConverter.convert(Long.valueOf(123456789)));
  }
}
View Full Code Here

    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(new BigInteger("12345")));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert("12345"));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(" 12345 "));
    assertEquals(new BigInteger("12345"), bigIntegerConverter.convert(Double.valueOf(12345.0D)));
    assertEquals(new BigInteger("123456789"), bigIntegerConverter.convert(Long.valueOf(123456789)));
  }
}
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.