From c2e4d8ab2a8af43f9dc3157a56a677824a86d703 Mon Sep 17 00:00:00 2001 From: nico Date: Sun, 8 Jan 2023 20:13:49 +0100 Subject: [PATCH] =?UTF-8?q?Nexus6=20JUnit=20Test=20hinzugef=C3=BCgt?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/domain/Nexus6Test.java | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Robbie-Management-System/src/domain/Nexus6Test.java diff --git a/Robbie-Management-System/src/domain/Nexus6Test.java b/Robbie-Management-System/src/domain/Nexus6Test.java new file mode 100644 index 0000000..3ae5d91 --- /dev/null +++ b/Robbie-Management-System/src/domain/Nexus6Test.java @@ -0,0 +1,24 @@ +package domain; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +import exceptions.RobotException; + +class Nexus6Test { + + @Test + void testInstanceNameiDPowerThink() throws RobotException { + assertTrue(Nexus6.getInstance() != null); + assertTrue(Nexus6.getInstance().getId() != 0); + assertEquals(19281982, Nexus6.getInstance().getId()); + assertTrue(Nexus6.getInstance().getName() != null); + assertEquals("Pris", Nexus6.getInstance().getName()); + assertTrue(Nexus6.getInstance().isPowerOn() != true); + Nexus6.getInstance().triggerPowerSwitch(); + assertTrue(Nexus6.getInstance().isPowerOn() != true); + assertTrue(Nexus6.getInstance().think(null) == null); + } + +}