コード例 #1
0
 @Test
 public void testCurrency() {
   assertEquals(USD, Money.dollar(1).currency());
   assertEquals(CHF, Money.franc(1).currency());
 }
コード例 #2
0
 @Test
 public void testEquality() {
   Money fiveFrancs = Money.franc(5);
   Money fiveDollars = Money.dollar(5);
   assertFalse(fiveFrancs.equals(fiveDollars));
 }