package ru.job4j.max;

import org.junit.Test;

import static org.hamcrest.core.Is.is;
import static org.junit.Assert.assertThat;

/**
*Test Max class.
*
* @author Kucyh Vasily (mailto:basil135@mail.ru)
* @version $Id$
* @since 31.03.2017
*/
public class MaxTest {

	/**
	* The method returns the second number, because numbers identical.
	*/
	@Test
	public void whenMaxTwoAndTwoThenTwo() {

		final int expectedValue;
		final int actualValue;

		Max max = new Max();

		expectedValue = 2;
		actualValue = max.max(2, 2);

		assertThat(expectedValue, is(actualValue));

	}

	/**
	* The method returns the most large number from two numbers, where the second number is large then first.
	*/
	@Test
	public void whenMaxTwoAndFourThenFour() {

		final int expectedValue;
		final int actualValue;

		Max max = new Max();

		expectedValue = 4;
		actualValue = max.max(2, 4);

		assertThat(expectedValue, is(actualValue));

	}

	/**
	* The method returns the most large number from two numbers, where the first number is large then second.
	*/
	@Test
	public void whenFourAndTwoThenFour() {

		final int expectedValue;
		final int actualValue;

		Max max = new Max();

		expectedValue = 4;
		actualValue = max.max(4, 2);

		assertThat(expectedValue, is(actualValue));

	}

}

@@ -1258,10 +1258,310 @@
 );%0A%0A%09%7D%0A%0A
+%09/**%0A%09* The method return the largest value from three numbers.%0A%09*/%0A%09public void whenOneAndTwoAndThreeThenThree() %7B%0A%0A%09%09final int expectedValue;%0A%09%09final int actualValue;%0A%0A%09%09Max max = new Max();%0A%0A%09%09expectedValue = 3;%0A%09%09actualValue = max.max(1, 2, 3);%0A%0A%09%09assertThat(expectedValue, is(actualValue));%0A%0A%09%7D%0A
 %7D%0A

Refactor MaxTest.java