Ejemplo n.º 1
0
 @Test
 public void getAssoc() throws Exception {
   TouchSensor<Void> touchSensor =
       TouchSensor.make(
           TouchSensorMode.TOUCH,
           SensorPort.S1,
           BlocklyBlockProperties.make("1", "1", false, false, false, false, false, true, false),
           null);
   SensorExpr<Void> sensorExpr = SensorExpr.make(touchSensor);
   Assert.assertEquals(Assoc.NONE, sensorExpr.getAssoc());
 }
Ejemplo n.º 2
0
 @Test
 public void getSensor() throws Exception {
   TouchSensor<Void> touchSensor =
       TouchSensor.make(
           TouchSensorMode.TOUCH,
           SensorPort.S1,
           BlocklyBlockProperties.make("1", "1", false, false, false, false, false, true, false),
           null);
   SensorExpr<Void> sensorExpr = SensorExpr.make(touchSensor);
   String a = "TouchSensor [port=S1]";
   Assert.assertEquals(a, sensorExpr.getSens().toString());
 }