diff --git a/Robbie-Management-System/src/main/RobotFactoryTest.java b/Robbie-Management-System/src/main/RobotFactoryTest.java new file mode 100644 index 0000000..5f3683d --- /dev/null +++ b/Robbie-Management-System/src/main/RobotFactoryTest.java @@ -0,0 +1,19 @@ +package main; + +import static org.junit.jupiter.api.Assertions.*; + +import org.junit.jupiter.api.Test; + +import domain.RobotType; + +class RobotFactoryTest { + + @Test + void testRobotFactory() { + assertEquals(10000, RobotFactory.robotFactory(RobotType.C3PO, "Test").getId()); + assertEquals("Test", RobotFactory.robotFactory(RobotType.C3PO, "Test").getName()); + assertEquals(0, RobotFactory.robotFactory(RobotType.R2D2, "Tes2t").getId()); + assertEquals("Test2", RobotFactory.robotFactory(RobotType.R2D2, "Test2").getName()); + assertTrue(RobotFactory.robotFactory(RobotType.NEXUS6, "Tes2t") == null); + } +}