src/test/java/org/thegalactic/dgraph/EdgeTest.java
@Test
    public void testCompareTo() {
        Node<String> source1 = new Node<String>();
        Node<String> target1 = new Node<String>();
        Node<String> source2 = new Node<String>();
        Node<String> target2 = new Node<String>();
        Edge<String, String> edge1 = new Edge<String, String>(source1, target1);
        Edge<String, String> edge2 = new Edge<String, String>(source2, target2);
        Edge<String, String> edge3 = new Edge<String, String>(source1, target2);
        assertEquals(0, edge1.compareTo(edge1));
        assertTrue(edge1.compareTo(edge2) < 0);
        assertTrue(edge2.compareTo(edge1) > 0);
        assertTrue(edge1.compareTo(edge3) < 0);
        assertTrue(edge3.compareTo(edge1) > 0);
    }
/**
     * Test the compareTo method, of class Edge.
     */
Test the compareTo method, of class Edge.
Test the compareTo method of class Edge .
@Test
    public void testCompareTo() {
        Node<String> source1 = new Node<String>();
        Node<String> target1 = new Node<String>();
        Node<String> source2 = new Node<String>();
        Node<String> target2 = new Node<String>();
        Edge<String, String> edge1 = new Edge<String, String>(source1, target1);
        Edge<String, String> edge2 = new Edge<String, String>(source2, target2);
        Edge<String, String> edge3 = new Edge<String, String>(source1, target2);
        assertEquals(0, edge1.compareTo(edge1));
        assertTrue(edge1.compareTo(edge2) < 0);
        assertTrue(edge2.compareTo(edge1) > 0);
        assertTrue(edge1.compareTo(edge3) < 0);
        assertTrue(edge3.compareTo(edge1) > 0);
    }
@ Test public void testCompareTo ( ) { Node < String > source1 = new Node < String > ( ) ; Node < String > target1 = new Node < String > ( ) ; Node < String > source2 = new Node < String > ( ) ; Node < String > target2 = new Node < String > ( ) ; Edge < String , String > edge1 = new Edge < String , String > ( source1 , target1 ) ; Edge < String , String > edge2 = new Edge < String , String > ( source2 , target2 ) ; Edge < String , String > edge3 = new Edge < String , String > ( source1 , target2 ) ; assertEquals ( 0 , edge1 . compareTo ( edge1 ) ) ; assertTrue ( edge1 . compareTo ( edge2 ) < 0 ) ; assertTrue ( edge2 . compareTo ( edge1 ) > 0 ) ; assertTrue ( edge1 . compareTo ( edge3 ) < 0 ) ; assertTrue ( edge3 . compareTo ( edge1 ) > 0 ) ; }
Test the compareTo method, of class Edge.
Test the compareTo method of class Edge .