Search in sources :

Example 1 with DeviceRuntime

use of com.ociweb.iot.maker.DeviceRuntime in project FogLight-Examples by oci-pronghorn.

the class AppTest method testApp.

@Ignore
public void testApp() {
    DeviceRuntime runtime = DeviceRuntime.test(new IoTApp());
    NonThreadScheduler scheduler = (NonThreadScheduler) runtime.getScheduler();
    scheduler.startup();
    TestHardware hardware = (TestHardware) runtime.getHardware();
    int iterations = 10;
    while (--iterations >= 0) {
        scheduler.run();
    // test application here
    }
}
Also used : NonThreadScheduler(com.ociweb.pronghorn.stage.scheduling.NonThreadScheduler) DeviceRuntime(com.ociweb.iot.maker.DeviceRuntime) TestHardware(com.ociweb.iot.hardware.impl.test.TestHardware) Ignore(org.junit.Ignore)

Aggregations

TestHardware (com.ociweb.iot.hardware.impl.test.TestHardware)1 DeviceRuntime (com.ociweb.iot.maker.DeviceRuntime)1 NonThreadScheduler (com.ociweb.pronghorn.stage.scheduling.NonThreadScheduler)1 Ignore (org.junit.Ignore)1