Hi there,
im just a stray (regarding this project) but what is the benefit of writing
assertThat(change.getChanges()).isNotNull().isNotEmpty().hasSize(1);
instead of
assertNotNull(change.getChanges());
assertEquals(1, change.getChanges().size());
?
Imho, the later is a easy to read and understand as your assertj example
(without introducing the dependency to another library).
Not to mention, you have one line per test assertion (one for the
NotNull check, and one for the size check)
Kind regards
Florian
Am 06.01.2017 um 12:43 schrieb Oliver B. Fischer:
1+, if you/we overhaul all existing tests and forbid the usage of
org.junit.Assert. Otherwise it is just another pet in our zoo.
Am 05.01.17 um 22:51 schrieb P. Ottlinger:
Hi,
does anyone object that we use assertj for mor expressive testing
matchers?
I just stumbled upon:
assertTrue(change.getChanges().size() == 1);
which would be more clear as
assertThat(change.getChanges()).isNotNull().isNotEmpty().hasSize(1);
Any objections if I add assertJ in test-scope?
Cheers,
Phil