@Before @SuppressWarnings("unchecked") public void setup() throws Exception { super.setup(); tested = spy(new ElementCardinalityEvaluationHandler(definitionManager, HANDLER)); }
@Before @SuppressWarnings("unchecked") public void setup() throws Exception { super.setup(); when(context.getParent()).thenReturn(element); tested = new NodeContainmentEvaluationHandler(definitionManager, CONTAINMENT_HANDLER); }
@Before @SuppressWarnings("unchecked") public void setup() throws Exception { super.setup(); when(context.getParent()).thenReturn(parent); tested = new NodeDockingEvaluationHandler(definitionManager, HANDLER); }
@Before @SuppressWarnings("unchecked") public void setup() throws Exception { super.setup(); final Set<String> edgeLabels = Collections.singleton(EDGE_ID); when(edge.getContent()).thenReturn(edgeContent); when(edge.getLabels()).thenReturn(edgeLabels); when(edgeContent.getDefinition()).thenReturn(edgeDefinition); when(definitionAdapter.getId(eq(edgeDefinition))).thenReturn(DefinitionId.build(EDGE_ID)); when(context.getConnector()).thenReturn(edge); when(context.getSource()).thenReturn(Optional.of(parent)); when(context.getTarget()).thenReturn(Optional.of(candidate)); tested = new GraphConnectionEvaluationHandler(definitionManager, HANDLER); }
@Before @SuppressWarnings("unchecked") public void setup() throws Exception { super.setup(); final Set<String> edgeLabels = Collections.singleton(EDGE_ID); evalUtils = spy(new GraphEvaluationHandlerUtils(definitionManager)); when(context.getCandidate()).thenReturn(candidate); when(context.getEdge()).thenReturn(edge); when(edge.getContent()).thenReturn(edgeContent); when(edge.getLabels()).thenReturn(edgeLabels); when(edgeContent.getDefinition()).thenReturn(edgeDefinition); when(definitionAdapter.getId(eq(edgeDefinition))).thenReturn(DefinitionId.build(EDGE_ID)); tested = new ConnectorCardinalityEvaluationHandler(evalUtils, new EdgeCardinalityEvaluationHandler()); }