BAEL-4717: Refactor examples
This commit is contained in:
parent
cc1a2e9b15
commit
79fc666e07
|
@ -14,9 +14,9 @@ public class ArrayListUnitTest {
|
|||
void givenArrayList_whenItemAddedToSpecificIndex_thenItCanBeRetrieved() {
|
||||
List<String> list = new ArrayList<>();
|
||||
list.add("Daniel");
|
||||
list.add(1, "Marko");
|
||||
list.add(0, "Marko");
|
||||
assertThat(list).hasSize(2);
|
||||
assertThat(list.get(1)).isEqualTo("Marko");
|
||||
assertThat(list.get(0)).isEqualTo("Marko");
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -15,7 +15,7 @@ public class LinkedListUnitTest {
|
|||
void givenLinkedList_whenItemIsAppended_thenItCanBeRetrieved() {
|
||||
LinkedList<String> list = new LinkedList<>();
|
||||
list.addLast("Daniel");
|
||||
list.addFirst( "Marko");
|
||||
list.addFirst("Marko");
|
||||
assertThat(list).hasSize(2);
|
||||
assertThat(list.getLast()).isEqualTo("Daniel");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue