@@ -0,0 +1,1634 @@
+package by.vorokhobko.3_conditional_operator;%0A%0Aimport org.junit.Test;%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A/**%0A * MaxTest.%0A *%0A * Class MaxTest for testing class Max part 001, lesson 3.%0A * @author Evgeny Vorokhobko (vorokhobko2011@yandex.ru).%0A * @since 06.12.2016.%0A * @version 1.%0A */%0Apublic class MaxTest %7B%0A%09  /**%0A%09  * @Test.%0A%09  * Max test positive numbers.%0A%09  */%0A%09  @Test%0A%09  public void methodDeterminesTheMaxInPositiveNumbers() %7B%0A%09%09%09Max max = new Max();%0A%09%09%09final int first = 1;%0A%09%09%09final int second = 2;%0A%09%09%09final int resultingNumber = 2;%0A%09%09%09int result = max.max(first, second);%0A%09%09%09assertThat(result, is(resultingNumber));%0A%09  %7D%0A%09  /**%0A%09  * @Test.%0A%09  * Max test negative numbers.%0A%09  */%0A%09  @Test%0A%09  public void methodDeterminesTheMaxInNegativeNumbers() %7B%0A%09%09%09Max max = new Max();%0A%09%09%09final int first = -1;%0A%09%09%09final int second = -2;%0A%09%09%09final int resultingNumber = -1;%0A%09%09%09int result = max.max(first, second);%0A%09%09%09assertThat(result, is(resultingNumber));%0A%09  %7D%0A%09  /**%0A%09  * @Test.%0A%09  * Max test negative number and positive number.%0A%09  */%0A%09  @Test%0A%09  public void methodDeterminesTheMaxNumber() %7B%0A%09%09%09Max max = new Max();%0A%09%09%09final int first = 1;%0A%09%09%09final int second = -2;%0A%09%09%09final int resultingNumber = 1;%0A%09%09%09int result = max.max(first, second);%0A%09%09%09assertThat(result, is(resultingNumber));%0A%09  %7D%0A%09  /**%0A%09  * @Test.%0A%09  * Max test equal numbers.%0A%09  */%0A%09  @Test%0A%09  public void methodDeterminesTheMax() %7B%0A%09%09%09Max max = new Max();%0A%09%09%09final int first = 2;%0A%09%09%09final int second = 2;%0A%09%09%09final int resultingNumber = 2;%0A%09%09%09int result = max.max(first, second);%0A%09%09%09assertThat(result, is(resultingNumber));%0A%09  %7D%0A%7D

Test class Max