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();