use of au.gov.asd.tac.constellation.graph.node.plugins.DefaultPluginInteraction in project constellation by constellation-app.
the class TestParametersPluginNGTest method testQueryException5.
/**
* Test of query method, of class TestParametersPlugin. Tests throwing of
* fatal pluginException
*/
@Test(expectedExceptions = PluginException.class)
public void testQueryException5() throws Exception {
System.out.println("throw pluginexception5");
final TestParametersPlugin instance = new TestParametersPlugin();
final PluginParameters result = instance.createParameters();
final GraphRecordStore recordStore = new GraphRecordStore();
final DefaultPluginInteraction interaction = new DefaultPluginInteraction(null, null);
// Set plugin query name here before execution
result.getParameters().get(CoreGlobalParameters.QUERY_NAME_PARAMETER_ID).setStringValue("TESTPARAMETERSPLUGIN");
// Set plugin parameters here before execution
result.getParameters().get(TestParametersPlugin.LEVEL_PARAMETER_ID).setStringValue("Fatal");
try {
instance.query(recordStore, interaction, result);
} catch (final PluginException ex) {
assertEquals(ex.getNotificationLevel(), PluginNotificationLevel.FATAL);
throw ex;
}
}
use of au.gov.asd.tac.constellation.graph.node.plugins.DefaultPluginInteraction in project constellation by constellation-app.
the class TestParametersPluginNGTest method testQueryException6.
/**
* Test of query method, of class TestParametersPlugin. Tests not throwing
* of pluginException
*/
@Test
public void testQueryException6() throws Exception {
System.out.println("throw pluginexception6");
final TestParametersPlugin instance = new TestParametersPlugin();
final PluginParameters result = instance.createParameters();
final GraphRecordStore recordStore = new GraphRecordStore();
final DefaultPluginInteraction interaction = new DefaultPluginInteraction(null, null);
// Set plugin query name here before execution
result.getParameters().get(CoreGlobalParameters.QUERY_NAME_PARAMETER_ID).setStringValue("TESTPARAMETERSPLUGIN");
// Set plugin parameters here before execution
result.getParameters().get(TestParametersPlugin.LEVEL_PARAMETER_ID).setStringValue("None");
instance.query(recordStore, interaction, result);
}
use of au.gov.asd.tac.constellation.graph.node.plugins.DefaultPluginInteraction in project constellation by constellation-app.
the class TestParametersPluginNGTest method testQueryException4.
/**
* Test of query method, of class TestParametersPlugin. Tests throwing of
* error pluginException
*/
@Test(expectedExceptions = PluginException.class)
public void testQueryException4() throws Exception {
System.out.println("throw pluginexception4");
final TestParametersPlugin instance = new TestParametersPlugin();
final PluginParameters result = instance.createParameters();
final GraphRecordStore recordStore = new GraphRecordStore();
final DefaultPluginInteraction interaction = new DefaultPluginInteraction(null, null);
// Set plugin query name here before execution
result.getParameters().get(CoreGlobalParameters.QUERY_NAME_PARAMETER_ID).setStringValue("TESTPARAMETERSPLUGIN");
// Set plugin parameters here before execution
result.getParameters().get(TestParametersPlugin.LEVEL_PARAMETER_ID).setStringValue("Error");
try {
instance.query(recordStore, interaction, result);
} catch (final PluginException ex) {
assertEquals(ex.getNotificationLevel(), PluginNotificationLevel.ERROR);
throw ex;
}
}
use of au.gov.asd.tac.constellation.graph.node.plugins.DefaultPluginInteraction in project constellation by constellation-app.
the class TestParametersPluginNGTest method testQueryCrash1.
/**
* Test of query method, of class TestParametersPlugin. Tests not throwing
* runtime exception
*/
@Test
public void testQueryCrash1() throws Exception {
System.out.println("test query crash1");
final TestParametersPlugin instance = new TestParametersPlugin();
final PluginParameters result = instance.createParameters();
final GraphRecordStore recordStore = new GraphRecordStore();
final DefaultPluginInteraction interaction = new DefaultPluginInteraction(null, null);
// Set plugin query name here before execution
result.getParameters().get(CoreGlobalParameters.QUERY_NAME_PARAMETER_ID).setStringValue("TESTPARAMETERSPLUGIN");
// Set plugin parameters here before execution
result.getParameters().get(TestParametersPlugin.CRASH_PARAMETER_ID).setBooleanValue(false);
instance.query(recordStore, interaction, result);
}
use of au.gov.asd.tac.constellation.graph.node.plugins.DefaultPluginInteraction in project constellation by constellation-app.
the class TestParametersPluginNGTest method testQueryException1.
/**
* Test of query method, of class TestParametersPlugin. Tests throwing of
* debug pluginException
*/
@Test(expectedExceptions = PluginException.class)
public void testQueryException1() throws Exception {
System.out.println("throw pluginexception1");
final TestParametersPlugin instance = new TestParametersPlugin();
final PluginParameters result = instance.createParameters();
final GraphRecordStore recordStore = new GraphRecordStore();
final DefaultPluginInteraction interaction = new DefaultPluginInteraction(null, null);
// Set plugin query name here before execution
result.getParameters().get(CoreGlobalParameters.QUERY_NAME_PARAMETER_ID).setStringValue("TESTPARAMETERSPLUGIN");
// Set plugin parameters here before execution
result.getParameters().get(TestParametersPlugin.LEVEL_PARAMETER_ID).setStringValue("Debug");
try {
instance.query(recordStore, interaction, result);
} catch (final PluginException ex) {
assertEquals(ex.getNotificationLevel(), PluginNotificationLevel.DEBUG);
throw ex;
}
}
Aggregations