Package siena.base.test.model

Examples of siena.base.test.model.BigDecimalModelStringId


    DataTypes same = pm.createQuery(DataTypes.class).get();
    assertEqualsDataTypes(dataTypes, same);
  }
 
  public void testBigDecimal() {
    BigDecimalModelStringId bigdec =
      new BigDecimalModelStringId("test", new BigDecimal("123456789.0123456890"));
    pm.insert(bigdec);
   
    BigDecimalModelStringId bigdec2 = pm.getByKey(BigDecimalModelStringId.class, bigdec.id);
    assertEquals(bigdec, bigdec2);
   
    bigdec =
      new BigDecimalModelStringId("test2",
          new BigDecimal("999999999.9999999999"));
    pm.insert(bigdec);
   
    bigdec2 = pm.getByKey(BigDecimalModelStringId.class, bigdec.id);
    assertEquals(bigdec, bigdec2);
   
    //-100.5
    bigdec =
      new BigDecimalModelStringId("test3", new BigDecimal("-100.5000000000"));
    pm.insert(bigdec);
   
    bigdec2 = pm.getByKey(BigDecimalModelStringId.class, bigdec.id);
    assertEquals(bigdec, bigdec2);
  }
View Full Code Here

TOP

Related Classes of siena.base.test.model.BigDecimalModelStringId

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.