use of au.gov.asd.tac.constellation.utilities.visual.DrawFlags in project constellation by constellation-app.
the class GraphVisualAccessNGTest method testGetDrawFlagsAttributeAdded.
/**
* Test of getDrawFlags method when attribute is added, of class
* GraphVisualAccess.
*
* @throws InterruptedException
*/
@Test
public void testGetDrawFlagsAttributeAdded() throws InterruptedException {
System.out.println("getDrawFlagsAttributeAdded");
final WritableGraph wg = graph.getWritableGraph("Graph Visual Access", true);
try {
final int graphDrawFlagsAttribute = VisualConcept.GraphAttribute.DRAW_FLAGS.ensure(wg);
wg.setObjectValue(graphDrawFlagsAttribute, 0, new DrawFlags(DrawFlags.NODE_LABELS));
} finally {
wg.commit();
}
final GraphVisualAccess instance = new GraphVisualAccess(graph);
instance.beginUpdate();
instance.updateInternally();
final DrawFlags flags = instance.getDrawFlags();
instance.endUpdate();
assertEquals(flags.getFlags(), 4);
}
Aggregations