I have a stupid thing, but I really can´t see what am I missing:
I have a test:
@Test
public void testeBerechneRendite() {
get("/rendite?jahresnettomiete=8000&kaufpreis=100000&nebenkosten=500")
.then().body(is(closeTo(0.079, 0.01)));
}
Error is:
Response body doesn't match expectation.
Expected: is a numeric value within <0.01> of <0.079>
Actual: 0.07960199004975124
It seams I don`t understand the closeTo(double, double). From my understanding all numbers between 0.069 and 0.089 should be valid. If I am totally wrong please clarify :-)