From eeb322db2ef033c5f819a6cf35448d7022a1119f Mon Sep 17 00:00:00 2001 From: Johannes Theiner Date: Fri, 16 Nov 2018 15:12:09 +0100 Subject: [PATCH] =?UTF-8?q?B2:=20Tests=20f=C3=BCr=20remove,=20auch=20wenn?= =?UTF-8?q?=20das=20bisher=20noch=20nicht=20implementiert=20ist?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../studium/algodat/vorlesung/Blatt2Test.java | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/test/java/xyz/joethei/studium/algodat/vorlesung/Blatt2Test.java b/src/test/java/xyz/joethei/studium/algodat/vorlesung/Blatt2Test.java index 7c1d860..994bf63 100644 --- a/src/test/java/xyz/joethei/studium/algodat/vorlesung/Blatt2Test.java +++ b/src/test/java/xyz/joethei/studium/algodat/vorlesung/Blatt2Test.java @@ -1,5 +1,6 @@ package xyz.joethei.studium.algodat.vorlesung; +import org.junit.jupiter.api.Disabled; import org.junit.jupiter.api.Test; import xyz.joethei.studium.algodat.praktikum.blatt2.List; import xyz.joethei.studium.algodat.praktikum.blatt2.RingList; @@ -7,6 +8,7 @@ import xyz.joethei.studium.algodat.praktikum.blatt2.RingList; import java.util.Optional; import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; class Blatt2Test { @@ -37,5 +39,17 @@ class Blatt2Test { assertEquals(10, rList.size()); } + @Disabled + @Test + void remove() { + List rList = new RingList<>(); + for (int i = 1; i <= 10; i++) { + rList.add(i * i); + } + assertEquals(Optional.of(36), Optional.ofNullable(rList.remove(5))); + assertEquals(9, rList.size()); + assertTrue(rList.get(5) != 36); + } + } \ No newline at end of file