Zooplus Tech Blog
  • Home
Sign in Subscribe

Rafał Leszko

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
Dec 2, 2015 5 min read
Page 1 of 1
Zooplus Tech Blog © 2023
Powered by Ghost