I often see in tests that people leave empty line between some test logic and assertions in tests. Is it good practise? Should I always do it, even if test is very small and consist of 2 lines?
For example:
@Test
public void simple() {
int a = 2;
int b = 2;
result = sum(a, b);
assertEquals(result, 4);
}
Aucun commentaire:
Enregistrer un commentaire