Package jodd.json.mock.superhero

Examples of jodd.json.mock.superhero.XRayVision


  public void testAutoTypeConvertToNumerical() {
    Account account = new JsonParser()
        .parse("{\"id\": \"5\", \"accountNumber\": \"1234567-123\"}", Account.class);
    assertEquals(new Integer(5), account.getId());

    XRayVision xray = new JsonParser().parse("{ \"power\": \"2.3\" }", XRayVision.class);
    assertEquals(2.3f, xray.getPower(), DELTA);
  }
View Full Code Here


  public Hero createSuperman() {
    return new Hero("Super Man",
        new SecretIdentity("Clark Kent"),
        new SecretLair("Fortress of Solitude"),
        new XRayVision(0.8f),
        new HeatVision(0.7f),
        new Flight(1000.0f),
        new Invincible());
  }
View Full Code Here

TOP

Related Classes of jodd.json.mock.superhero.XRayVision

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.