import static org.junit.Assert.*;

/**
 * Created by ANTON on 08.06.2017.
 */
public class SimpleListTest {

}
@@ -1,110 +1,2286 @@
-import static org.junit.Assert.*;%0A%0A/**%0A * Created by ANTON on 08.06.2017.%0A */%0Apublic class SimpleListTest %7B
+package ru.job4j;%0A%0Aimport org.junit.Before;%0Aimport org.junit.Test;%0A%0Aimport java.util.NoSuchElementException;%0A%0Aimport static org.hamcrest.Matchers.is;%0Aimport static org.junit.Assert.*;%0A%0A/**%0A * Created by ANTON on 08.06.2017.%0A */%0Apublic class SimpleListTest%3CString%3E %7B%0A%0A    /**.%0A     * Create link for object class SimpleList%0A     */%0A    private SimpleList%3CString%3E sLT;%0A%0A    /**.%0A     * Preparing for Test%0A     */%0A    @Before%0A    public void preparingForTests() %7B%0A        sLT = new SimpleList(3);%0A    %7D%0A%0A    @Test%0A    public void whenAddNewElementToArray() %7B%0A        String obj = (String) %22Test%22;%0A        sLT.add(obj);%0A        String test = sLT.get(0);%0A        assertThat(test, is(%22Test%22));%0A    %7D%0A%0A    @Test%0A    public void whenUpdateElementArrayOnThisPosition() %7B%0A        String newObj = (String) %22Test two%22;%0A        sLT.update(0, newObj);%0A        String test = sLT.get(0);%0A        assertThat(test, is(newObj));%0A    %7D%0A%0A    @Test%0A    public void whenDeleteElementFromThisPosition() %7B%0A        String test = (String) %22Test%22;%0A        sLT.add(test);%0A        sLT.delete(0);%0A        assertNull(sLT.get(0));%0A    %7D%0A%0A    @Test%0A    public void whenAddNullElement() %7B%0A        String test = null;%0A        try %7B%0A            sLT.add(test);%0A        %7D catch (NullPointerException npe) %7B%0A            assertThat(npe.getMessage(), is(%22Element is null%22));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void whenUpdateElementNullElement() %7B%0A        String test = null;%0A        try %7B%0A            sLT.update(0, test);%0A        %7D catch (NullPointerException npe) %7B%0A            assertThat(npe.getMessage(), is(%22this value is null%22));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void whenDeleteElementWhichIsNot() %7B%0A        try %7B%0A            sLT.delete(2);%0A        %7D catch (NoSuchElementException nee) %7B%0A            assertThat(nee.getMessage(), is(%22In this no element%22));%0A        %7D%0A    %7D%0A%0A    @Test%0A    public void whenAddToManyItems() %7B%0A        String one = (String) %22Test%22;%0A        String two = (String) %22Test%22;%0A        String tree = (String) %22Test%22;%0A        String four = (String) %22Test%22;%0A        sLT.add(one);%0A        sLT.add(two);%0A        sLT.add(tree);%0A        try %7B%0A            sLT.add(four);%0A        %7D catch (ArrayIndexOutOfBoundsException aio) %7B%0A            assertThat(aio.getMessage(), is(%22Too far%22));%0A        %7D%0A    %7D
 %0A%0A%7D

add file for chapter_003_5.2.1