Search in sources :

Example 16 with GraphReadMethods

use of au.gov.asd.tac.constellation.graph.GraphReadMethods in project constellation by constellation-app.

the class IntegerAttributeDescriptionNGTest method testCopy.

/**
 * Test of copy method, of class IntegerAttributeDescription.
 */
@Test
public void testCopy() {
    GraphReadMethods graph = new StoreGraph();
    AttributeDescription expResult = instance;
    AttributeDescription result = instance.copy(graph);
    assertEquals(result.getInt(0), expResult.getInt(0));
}
Also used : GraphReadMethods(au.gov.asd.tac.constellation.graph.GraphReadMethods) StoreGraph(au.gov.asd.tac.constellation.graph.StoreGraph) Test(org.testng.annotations.Test)

Example 17 with GraphReadMethods

use of au.gov.asd.tac.constellation.graph.GraphReadMethods in project constellation by constellation-app.

the class LongAttributeDescriptionNGTest method testCopy.

/**
 * Test of copy method, of class LongAttributeDescription.
 */
@Test
public void testCopy() {
    GraphReadMethods graph = new StoreGraph();
    AttributeDescription expResult = instance;
    AttributeDescription result = instance.copy(graph);
    assertEquals(result.getLong(0), expResult.getLong(0));
}
Also used : GraphReadMethods(au.gov.asd.tac.constellation.graph.GraphReadMethods) StoreGraph(au.gov.asd.tac.constellation.graph.StoreGraph) Test(org.testng.annotations.Test)

Example 18 with GraphReadMethods

use of au.gov.asd.tac.constellation.graph.GraphReadMethods in project constellation by constellation-app.

the class BooleanAttributeDescriptionNGTest method testCopy.

/**
 * Test of copy method, of class BooleanAttributeDescription.
 */
@Test
public void testCopy() {
    GraphReadMethods graph = new StoreGraph();
    AttributeDescription expResult = instance;
    AttributeDescription result = instance.copy(graph);
    assertEquals(result.getBoolean(0), expResult.getBoolean(0));
}
Also used : GraphReadMethods(au.gov.asd.tac.constellation.graph.GraphReadMethods) StoreGraph(au.gov.asd.tac.constellation.graph.StoreGraph) Test(org.testng.annotations.Test)

Example 19 with GraphReadMethods

use of au.gov.asd.tac.constellation.graph.GraphReadMethods in project constellation by constellation-app.

the class DefaultPluginEnvironmentNGTest method testExecuteReadPluginNowThrowsRuntimeException.

@Test(expectedExceptions = RuntimeException.class)
public void testExecuteReadPluginNowThrowsRuntimeException() throws Exception {
    System.out.println("executeReadPluginNow");
    GraphReadMethods graph = mock(GraphReadMethods.class);
    Plugin plugin = mock(Plugin.class);
    PluginParameters parameters = mock(PluginParameters.class);
    RuntimeException runtimeException = mock(RuntimeException.class);
    boolean interactive = false;
    DefaultPluginEnvironment instance = new DefaultPluginEnvironment();
    doThrow(runtimeException).when(plugin).run(any(GraphReadMethods.class), any(PluginInteraction.class), any(PluginParameters.class));
    instance.executeReadPluginNow(graph, plugin, parameters, interactive);
}
Also used : GraphReadMethods(au.gov.asd.tac.constellation.graph.GraphReadMethods) PluginInteraction(au.gov.asd.tac.constellation.plugins.PluginInteraction) PluginParameters(au.gov.asd.tac.constellation.plugins.parameters.PluginParameters) Plugin(au.gov.asd.tac.constellation.plugins.Plugin) Test(org.testng.annotations.Test)

Example 20 with GraphReadMethods

use of au.gov.asd.tac.constellation.graph.GraphReadMethods in project constellation by constellation-app.

the class StringAttributeDescriptionNGTest method testCopy.

/**
 * Test of copy method, of class StringAttributeDescription.
 */
@Test
public void testCopy() {
    GraphReadMethods graph = new StoreGraph();
    AttributeDescription expResult = instance;
    AttributeDescription result = instance.copy(graph);
    assertEquals(result.getString(0), expResult.getString(0));
}
Also used : GraphReadMethods(au.gov.asd.tac.constellation.graph.GraphReadMethods) StoreGraph(au.gov.asd.tac.constellation.graph.StoreGraph) Test(org.testng.annotations.Test)

Aggregations

GraphReadMethods (au.gov.asd.tac.constellation.graph.GraphReadMethods)20 Test (org.testng.annotations.Test)15 StoreGraph (au.gov.asd.tac.constellation.graph.StoreGraph)12 PluginParameters (au.gov.asd.tac.constellation.plugins.parameters.PluginParameters)7 PluginInteraction (au.gov.asd.tac.constellation.plugins.PluginInteraction)6 Plugin (au.gov.asd.tac.constellation.plugins.Plugin)5 ReadableGraph (au.gov.asd.tac.constellation.graph.ReadableGraph)4 Graph (au.gov.asd.tac.constellation.graph.Graph)3 RecordStore (au.gov.asd.tac.constellation.graph.processing.RecordStore)3 PluginException (au.gov.asd.tac.constellation.plugins.PluginException)3 File (java.io.File)3 IOException (java.io.IOException)3 ArrayList (java.util.ArrayList)3 List (java.util.List)3 GraphElementType (au.gov.asd.tac.constellation.graph.GraphElementType)2 GraphNode (au.gov.asd.tac.constellation.graph.node.GraphNode)2 GraphRecordStoreUtilities (au.gov.asd.tac.constellation.graph.processing.GraphRecordStoreUtilities)2 VisualConcept (au.gov.asd.tac.constellation.graph.schema.visual.concept.VisualConcept)2 PluginParameter (au.gov.asd.tac.constellation.plugins.parameters.PluginParameter)2 MultiChoiceParameterType (au.gov.asd.tac.constellation.plugins.parameters.types.MultiChoiceParameterType)2