Nexus6 JUnit Test hinzugefügt
parent
a0f16fc808
commit
c2e4d8ab2a
|
@ -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);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue