RoboterTest smokeTest() wurde C3PO ergänzt.

master
nikow 2023-01-07 14:45:29 +01:00
parent 38341c1c60
commit 18d4f8152c
1 changed files with 5 additions and 2 deletions

View File

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