Aggiunto classe Sensor e testSensor. NON SO se giusto
This commit is contained in:
23
src/test/java/TestSensor.java
Normal file
23
src/test/java/TestSensor.java
Normal file
@@ -0,0 +1,23 @@
|
||||
import device.Hue;
|
||||
import device.Sensor;
|
||||
import org.junit.Test;
|
||||
|
||||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
public class TestSensor {
|
||||
Sensor sensor = new Sensor();
|
||||
Hue hue = new Hue();
|
||||
|
||||
@Test
|
||||
public void firstTestSensor() {
|
||||
assertTrue(sensor.IsLowLuminescence(50));
|
||||
}
|
||||
|
||||
@Test
|
||||
public void secondTestSensor() {
|
||||
if(sensor.IsLowLuminescence(50)) {
|
||||
hue.turnOn();
|
||||
hue.setBrightness(200);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user