From 18d4f8152c94b206df4b34f6a0a80749a1002fc2 Mon Sep 17 00:00:00 2001 From: nikow Date: Sat, 7 Jan 2023 14:45:29 +0100 Subject: [PATCH] =?UTF-8?q?RoboterTest=20smokeTest()=20wurde=20C3PO=20erg?= =?UTF-8?q?=C3=A4nzt.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Roboterfabrik/src/Domäne/RoboterTest.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Roboterfabrik/src/Domäne/RoboterTest.java b/Roboterfabrik/src/Domäne/RoboterTest.java index c73d010..23ee0d0 100644 --- a/Roboterfabrik/src/Domäne/RoboterTest.java +++ b/Roboterfabrik/src/Domäne/RoboterTest.java @@ -11,8 +11,11 @@ class RoboterTest { @Test void smokeTest() { Roboter roboter = new R2D2("Test", 1); + Roboter robi = new C3PO("Test2", 10000); assertEquals(roboter.getName(), "Test"); assertEquals(1,roboter.getId()); + assertEquals(robi.getName(), "Test2"); + assertEquals(10000, robi.getId()); } @Test void triggerPowerSwitchTest() { @@ -28,7 +31,7 @@ class RoboterTest { assertTrue(c3po.isPowerOn()); } - + @Test void getLastExceptionTest() { Roboter r2d2 = new R2D2("Test", 1); int [] zahlen = {5,4,8,1}; @@ -38,7 +41,7 @@ class RoboterTest { } catch (RobotException e) { } assertNotNull(r2d2.getLastException()); } - + @Test void nexus6SingletonTest() { Roboter pris = Nexus6.getInstance(); Roboter pris2 = Nexus6.getInstance();