@Test public void testInit2() { // System.out.println("Test init with double"); Currency currency = new Currency(Currency.CarryType.Two, 0.0); Assert.assertEquals(0, currency.getWhole()); Assert.assertEquals(0, currency.getDecimal()); currency = new Currency(Currency.CarryType.Two, 555.0); Assert.assertEquals(555, currency.getWhole()); Assert.assertEquals(0, currency.getDecimal()); }
@Test public void testInit() { // System.out.println("Test init with double"); Currency currency = new Currency(Currency.CarryType.Two, 32.23); Assert.assertEquals(32l, currency.getWhole()); Assert.assertEquals(23l, currency.getDecimal()); }