use of io.siddhi.query.api.definition.TriggerDefinition in project siddhi by wso2.
the class DefineTriggerTestCase method testTriggerEventNull.
@Test(expectedExceptions = SiddhiAppValidationException.class)
public void testTriggerEventNull() {
TriggerDefinition trigger = null;
SiddhiApp.siddhiApp("test").defineTrigger(trigger);
}
use of io.siddhi.query.api.definition.TriggerDefinition in project siddhi by wso2.
the class TriggerTestCase method testQuery2.
@Test(expectedExceptions = SiddhiAppValidationException.class, dependsOnMethods = "testQuery1")
public void testQuery2() throws InterruptedException {
log.info("testTrigger2 - OUT 0");
SiddhiManager siddhiManager = new SiddhiManager();
TriggerDefinition triggerDefinition = TriggerDefinition.id("cseEventStream").atEvery(Expression.Time.milliSec(500)).at("start");
SiddhiApp siddhiApp = new SiddhiApp("ep1");
siddhiApp.defineTrigger(triggerDefinition);
SiddhiAppRuntime siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(siddhiApp);
siddhiAppRuntime.shutdown();
}
Aggregations