开云体育

ctrl + shift + ? for shortcuts
© 2025 Groups.io

[TDD] this time for sure


Dierk.Koenig@t-online.de
 

This time for sure

p.27

assertEquals(new Money(10/5,"CHF"),francs);

I always try to avoid calculations in the expected values
like the 10/5 here. It does an implicit "floor" when
converting to int, which works, even with 10/3 because the
production code does the very same.

But that is an aspekt that is not communicated at all
and is fairly easy to miss for the casual reader.

cheers
Dierk