@@ -0,0 +1,870 @@
+package nl.peterbloem.motive;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Aimport org.junit.Test;%0Aimport org.nodes.DGraph;%0Aimport org.nodes.DNode;%0Aimport org.nodes.DiskDGraph;%0Aimport org.nodes.random.RandomGraphs;%0A%0A/**%0A * General tests, not specific to a class.%0A * @author Peter%0A *%0A */%0Apublic class Tests %7B%0A%09public static final File DIR = new File(%22./tmp/%22);%0A%09%0A%09@Test%0A%09public void testSubgraphs()%0A%09%09throws IOException%0A%09%7B%0A%09%09%0A%09%09DGraph%3CString%3E graph = RandomGraphs.randomDirectedFast(100, 200);%0A%09%09graph = DiskDGraph.copy(graph, DIR);%0A%09%09%0A%09%09DPlainMotifExtractor%3CString%3E ex = new DPlainMotifExtractor%3CString%3E(graph, 100000, 3, 6, 5);%0A%09%09%0A%09%09for(DGraph%3CString%3E sub : ex.subgraphs())%0A%09%09%09for(DNode%3CString%3E node : sub.nodes())%0A%09%09%09%7B%0A%09%09%09%09assertTrue(node.neighbors().size() == node.degree());%0A%09%09%09%09%0A%09%09%09%09assertTrue(node.degree() %3E 0);%0A%09%09%09%7D%0A%09%7D%0A%0A%7D%0A

Test case for DiskDGraph