@@ -0,0 +1,1437 @@
+package by.vorokhobko.4_Cycles;%0A%0Aimport org.junit.Test;%0Aimport static org.hamcrest.CoreMatchers.is;%0Aimport static org.junit.Assert.assertThat;%0A%0A/**%0A * CounterTest.%0A *%0A * Class CounterTest for testing class Counter part 001, lesson 4.%0A * @author Evgeny Vorokhobko (vorokhobko2011@yandex.ru).%0A * @since 10.12.2016.%0A * @version 1.%0A */%0A%0A public class CounterTest %7B%0A%09  /**%0A%09  * @Test.%0A%09  * %D0%A1alculates the sum of the even positive integers.%0A%09  */%0A%09  @Test%0A%09  public void calculatesTheSumOfTheEvenPositiveIntegers() %7B%0A%09%09  Counter count = new Counter();%0A%09%09  final int start = 1;%0A%09%09  final int finish = 11;%0A%09%09  final int resultingSum = 30;%0A%09%09  int result = count.add(start, finish);%0A%09%09  assertThat(result, is(resultingSum));%0A%09  %7D%0A%09  /**%0A%09  * @Test.%0A%09  * %D0%A1alculates the sum of the even negative integers.%0A%09  */%0A%09  @Test%0A%09  public void calculatesTheSumOfTheEvenNegativeIntegers() %7B%0A%09%09  Counter count = new Counter();%0A%09%09  final int start = -11;%0A%09%09  final int finish = -1;%0A%09%09  final int resultingSum = -30;%0A%09%09  int result = count.add(start, finish);%0A%09%09  assertThat(result, is(resultingSum));%0A%09  %7D%0A%09  /**%0A%09  * @Test.%0A%09  * %D0%A1alculates the sum of the even positive integers.%0A%09  */%0A%09  @Test%0A%09  public void calculatesTheSumOfTheEvenIntegers() %7B%0A%09%09  Counter count = new Counter();%0A%09%09  final int start = -5;%0A%09%09  final int finish = 5;%0A%09%09  final int resultingSum = 0;%0A%09%09  int result = count.add(start, finish);%0A%09%09  assertThat(result, is(resultingSum));%0A%09  %7D%0A %7D

Test class Counter