|
| 1 | +import org.junit.jupiter.api.Disabled; |
| 2 | +import org.junit.jupiter.api.DisplayName; |
| 3 | +import org.junit.jupiter.api.Test; |
| 4 | + |
| 5 | +import static org.assertj.core.api.Assertions.assertThat; |
| 6 | + |
| 7 | +public class SquareRootTest { |
| 8 | + @Test |
| 9 | + @DisplayName("Square root of 1") |
| 10 | + public void squareRootOf1() { |
| 11 | + assertThat(new SquareRoot().squareRoot(1)) |
| 12 | + .isEqualTo(1); |
| 13 | + } |
| 14 | + |
| 15 | + @Disabled("Remove to run test") |
| 16 | + @Test |
| 17 | + @DisplayName("Square root of 4") |
| 18 | + public void squareRootOf4() { |
| 19 | + assertThat(new SquareRoot().squareRoot(4)) |
| 20 | + .isEqualTo(2); |
| 21 | + } |
| 22 | + |
| 23 | + @Disabled("Remove to run test") |
| 24 | + @Test |
| 25 | + @DisplayName("Square root of 25") |
| 26 | + public void squareRootOf25() { |
| 27 | + assertThat(new SquareRoot().squareRoot(25)) |
| 28 | + .isEqualTo(5); |
| 29 | + } |
| 30 | + |
| 31 | + @Disabled("Remove to run test") |
| 32 | + @Test |
| 33 | + @DisplayName("Square root of 81") |
| 34 | + public void squareRootOf81() { |
| 35 | + assertThat(new SquareRoot().squareRoot(81)) |
| 36 | + .isEqualTo(9); |
| 37 | + } |
| 38 | + |
| 39 | + @Disabled("Remove to run test") |
| 40 | + @Test |
| 41 | + @DisplayName("Square root of 196") |
| 42 | + public void squareRootOf196() { |
| 43 | + assertThat(new SquareRoot().squareRoot(196)) |
| 44 | + .isEqualTo(14); |
| 45 | + } |
| 46 | + |
| 47 | + @Disabled("Remove to run test") |
| 48 | + @Test |
| 49 | + @DisplayName("Square root of 65025") |
| 50 | + public void squareRootOf65025() { |
| 51 | + assertThat(new SquareRoot().squareRoot(65025)) |
| 52 | + .isEqualTo(255); |
| 53 | + } |
| 54 | +} |
0 commit comments