Zooplus Tech Blog
  • Home
Subscribe

Rafał Leszko

1 post published

Perfect Unit Test

This is a perfect unit test. @Test public void Should_Sum_When_ArgumentsAreSmall() { // given Sumator sumator = new Sumator(); // when Integer result = sumator.sum(1, 2); // then assertThat(result).isEqualTo(3); } Take a look. Take a deep look. If all your unit tests look like this, you’re saved. Your career

Rafał Leszko Dec 2, 2015 • 5 min read
Zooplus Tech Blog © 2022
Powered by Ghost