Test case changes to assert error message
@@ -35,7 +35,6 @@ import org.wso2.siddhi.core.util.EventPrinter;
import org.wso2.siddhi.core.util.SiddhiTestHelper;
import org.wso2.siddhi.core.util.persistence.InMemoryPersistenceStore;
import org.wso2.siddhi.core.util.persistence.PersistenceStore;
-import org.wso2.siddhi.query.api.exception.SiddhiAppValidationException;
import java.util.concurrent.atomic.AtomicInteger;
@@ -74,8 +73,8 @@ public class DelayWindowTestCase {
siddhiAppRuntime.shutdown();
}
- @Test(description = "Check if Siddhi App Creation fails when more than one parameter is included", expectedExceptions = SiddhiAppCreationException.class)
-
+ @Test(description = "Check if Siddhi App Creation fails when more than one parameter is included",
+ expectedExceptions = SiddhiAppCreationException.class)
public void delayWindowTest1() {
log.info("DelayWindow Test1 : Testing window parameter definition2");
SiddhiManager siddhiManager = new SiddhiManager();
@@ -85,7 +84,8 @@ public class DelayWindowTestCase {
siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(query);
} catch (SiddhiAppCreationException e) {
error = false;
- AssertJUnit.assertEquals("Delay window should only have one parameter (<int|long|time> delayTime), but found 2 input attributes", e.getCause().getMessage());
+ AssertJUnit.assertEquals("Delay window should only have one parameter (<int|long|time> delayTime), " +
+ "but found 2 input attributes", e.getCause().getMessage());
throw e;
} finally {
if (siddhiAppRuntime != null) {
@@ -94,7 +94,8 @@ public class DelayWindowTestCase {
}
}
- @Test(description = "Check if Siddhi App Creation fails when the type of parameter is neither int or long", expectedExceptions = SiddhiAppCreationException.class)
+ @Test(description = "Check if Siddhi App Creation fails when the type of parameter is neither int or long",
+ expectedExceptions = SiddhiAppCreationException.class)
public void delayWindowTest2() {
log.info("DelayWindow Test2 : Testing window parameter definition3");
SiddhiManager siddhiManager = new SiddhiManager();
@@ -104,7 +105,8 @@ public class DelayWindowTestCase {
siddhiAppRuntime = siddhiManager.createSiddhiAppRuntime(query);
} catch (SiddhiAppCreationException e) {
error = false;
- AssertJUnit.assertEquals("Delay window's parameter attribute should be either int or long, but found STRING", e.getCause().getMessage());
+ AssertJUnit.assertEquals("Delay window's parameter attribute should be either int or long, " +
+ "but found STRING", e.getCause().getMessage());
throw e;
} finally {
if (siddhiAppRuntime != null) {
