protected void assertEquals(IPartition expectedPartition, IPartition actualPartition) { assertNotNull(expectedPartition); assertNotNull(actualPartition); if (expectedPartition != null && actualPartition != null) { assertEquals(expectedPartition.getId(), actualPartition.getId()); assertEquals(expectedPartition.isDirected(), actualPartition.isDirected()); for (ISubgraph expectedSubgraph : expectedPartition) { ISubgraph actualSubgraph = actualPartition.getSubgraph(expectedSubgraph.getId()); assertEquals(expectedSubgraph, actualSubgraph); } } }
protected void assertEquals(ISubgraph expectedSubgraph, ISubgraph actualSubgraph) { assertNotNull(expectedSubgraph); assertNotNull(actualSubgraph); if (expectedSubgraph != null && actualSubgraph != null) { assertEquals(expectedSubgraph.getId(), actualSubgraph.getId()); assertEquals( expectedSubgraph.getTemplate().numVertices(), actualSubgraph.getTemplate().numVertices()); assertEquals( expectedSubgraph.getTemplate().numEdges(), actualSubgraph.getTemplate().numEdges()); assertEquals(expectedSubgraph.isDirected(), actualSubgraph.isDirected()); assertEquals( expectedSubgraph.getTemplate().isDirected(), actualSubgraph.getTemplate().isDirected()); assertEquals(actualSubgraph.isDirected(), actualSubgraph.getTemplate().isDirected()); // TODO: verify individual vertices/edges } }