src/test/java/org/thegalactic/lattice/ConceptLatticeTest.java
@Test
    public void testGetJoinReduction() {
        TreeSet<Comparable> com1 = new TreeSet<Comparable>();
        TreeSet<Comparable> com2 = new TreeSet<Comparable>();
        TreeSet<Comparable> com3 = new TreeSet<Comparable>();
        TreeSet<Comparable> com4 = new TreeSet<Comparable>();
        com1.add((Comparable) "a");
        com2.add((Comparable) "b");
        com3.add((Comparable) "c");
        com4.add((Comparable) "d");
        Lattice l = new Lattice();
        Concept a = new Concept(com1, com4);
        l.addNode(a);
        Concept b = new Concept(com3, com2);
        l.addNode(b);
        l.addEdge(a, b);
        ConceptLattice instance = new ConceptLattice(l);
        Lattice lat = instance.getJoinReduction();
        assertTrue(lat.isLattice());
        assertEquals(2, lat.getNodes().size());
        assertEquals(1, lat.getEdges().size());
    }
/**
     * Test of getJoinReduction method, of class ConceptLattice.
     */
Test of getJoinReduction method, of class ConceptLattice.
Test of getJoinReduction method of class ConceptLattice .
@Test
    public void testGetJoinReduction() {
        TreeSet<Comparable> com1 = new TreeSet<Comparable>();
        TreeSet<Comparable> com2 = new TreeSet<Comparable>();
        TreeSet<Comparable> com3 = new TreeSet<Comparable>();
        TreeSet<Comparable> com4 = new TreeSet<Comparable>();
        com1.add((Comparable) "a");
        com2.add((Comparable) "b");
        com3.add((Comparable) "c");
        com4.add((Comparable) "d");
        Lattice l = new Lattice();
        Concept a = new Concept(com1, com4);
        l.addNode(a);
        Concept b = new Concept(com3, com2);
        l.addNode(b);
        l.addEdge(a, b);
        ConceptLattice instance = new ConceptLattice(l);
        Lattice lat = instance.getJoinReduction();
        assertTrue(lat.isLattice());
        assertEquals(2, lat.getNodes().size());
        assertEquals(1, lat.getEdges().size());
    }
@ Test public void testGetJoinReduction ( ) { TreeSet < Comparable > com1 = new TreeSet < Comparable > ( ) ; TreeSet < Comparable > com2 = new TreeSet < Comparable > ( ) ; TreeSet < Comparable > com3 = new TreeSet < Comparable > ( ) ; TreeSet < Comparable > com4 = new TreeSet < Comparable > ( ) ; com1 . add ( ( Comparable ) "a" ) ; com2 . add ( ( Comparable ) "b" ) ; com3 . add ( ( Comparable ) "c" ) ; com4 . add ( ( Comparable ) "d" ) ; Lattice l = new Lattice ( ) ; Concept a = new Concept ( com1 , com4 ) ; l . addNode ( a ) ; Concept b = new Concept ( com3 , com2 ) ; l . addNode ( b ) ; l . addEdge ( a , b ) ; ConceptLattice instance = new ConceptLattice ( l ) ; Lattice lat = instance . getJoinReduction ( ) ; assertTrue ( lat . isLattice ( ) ) ; assertEquals ( 2 , lat . getNodes ( ) . size ( ) ) ; assertEquals ( 1 , lat . getEdges ( ) . size ( ) ) ; }
Test of getJoinReduction method, of class ConceptLattice.
Test of getJoinReduction method of class ConceptLattice .