@@ -0,0 +1,876 @@
+package by.vorokhobko;%0A%0Aimport org.junit.Test;%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A/**%0A* FacorialTest.%0A*%0A* Class FactorialTest for testing class Factorial part 001, lesson 4.%0A* @author Evgeny Vorokhobko (vorokhobko2011@yandex.ru).%0A* @since 10.12.2016.%0A* @version 1.%0A*/%0A%0Apublic class FactorialTest %7B%0A%09/**%0A%09* @Test.%0A%09* The method calculates the factorial.%0A%09*/%0A%09@Test%0A%09public void computedFactorial() %7B%0A%09%09Factorial fact = new Factorial();%0A%09%09final int n = 6;%0A%09%09final int totalFact = 120;%0A%09%09int result = fact.mult(n);%0A%09%09assertThat(result, is(totalFact));%0A%09%7D%0A%09/**%0A%09* @Test.%0A%09* The method calculates the factorial if n anyway 0.%0A%09*/%0A%09@Test%0A%09public void computedFactorialZero() %7B%0A%09%09Factorial fact = new Factorial();%0A%09%09final int n = 0;%0A%09%09final int totalFact = 1;%0A%09%09int result = fact.mult(n);%0A%09%09assertThat(result, is(totalFact));%0A%09%7D%0A%7D

add class FactorialTest