Пример #1
0
 @Test
 public void itShouldCalculateSumWithInts() {
   Dollars sum = zero.plus(1);
   Assert.assertEquals(one, sum);
 }
Пример #2
0
 @Test
 public void itShouldReturnItSelfWhenIAddZero() {
   Dollars sum = one.plus(zero);
   Assert.assertEquals(one, sum);
 }
Пример #3
0
 @Test
 public void itShouldCalculateSumWithDollars() {
   Dollars sum = fraction.plus(one);
   Assert.assertEquals(new Dollars(2.75), sum);
 }