예제 #1
0
  @Test
  public void testDollarMultiplication() {
    Money five = Money.dollar(5);
    assertEquals(Money.dollar(5), five);
    assertEquals(Money.dollar(10), five.times(2));

    assertEquals(Money.dollar(5), five);
    assertEquals(Money.dollar(15), five.times(3));
  }
예제 #2
0
  @Test
  public void testFrancMultiplication() {
    Money five = Money.franc(5);
    assertEquals(Money.franc(5), five);
    assertEquals(Money.franc(10), five.times(2));

    assertEquals(Money.franc(5), five);
    assertEquals(Money.franc(15), five.times(3));
  }