Skip to content

Commit

Permalink
Add tests for removeTaxes
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Debon committed Jan 15, 2019
1 parent 2115249 commit 0844258
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions src/test/java/InverseTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,25 @@ public void _100_120() {

assertThat(actual.getValue()).isEqualByComparingTo(BigDecimal.valueOf(120.0));
}

@Test
public void _1dot20_1() {
Price actual = cut.removeTaxes(new Price().withValue(BigDecimal.valueOf(1.2)));

assertThat(actual.getValue()).isEqualByComparingTo(BigDecimal.valueOf(1.0));
}

@Test
public void _27dot6_23() {
Price actual = cut.removeTaxes(new Price().withValue(BigDecimal.valueOf(27.6)));

assertThat(actual.getValue()).isEqualByComparingTo(BigDecimal.valueOf(23.0));
}

@Test
public void _120_100() {
Price actual = cut.removeTaxes(new Price().withValue(BigDecimal.valueOf(120.0)));

assertThat(actual.getValue()).isEqualByComparingTo(BigDecimal.valueOf(100.0));
}
}

0 comments on commit 0844258

Please sign in to comment.