Aggiunto classe Sensor e testSensor. NON SO se giusto

This commit is contained in:
f19stefano96
2018-05-31 21:14:58 +02:00
parent 749e9ed078
commit 09f96fc590
9 changed files with 551 additions and 97 deletions

View 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);
}
}
}