src/test/java/org/thegalactic/context/constraint/categorical/CategoricalValueTest.java
@Test
    public void testIndex() {
        CategoricalModel model = CategoricalModel.create();
        CategoricalAttribute attribute1 = model.addAttribute();
        assertEquals(0, attribute1.addValue("Test1").index());
        assertEquals(1, attribute1.addValue("Test2").index());
        assertEquals(2, attribute1.addValue("Test3").index());
        CategoricalAttribute attribute2 = model.addAttribute();
        assertEquals(3, attribute2.addValue("Test4").index());
        assertEquals(4, attribute2.addValue("Test5").index());
    }
/**
     * Test of index method, of class CategoricalValue.
     */
Test of index method, of class CategoricalValue.
Test of index method of class CategoricalValue .
@Test
    public void testIndex() {
        CategoricalModel model = CategoricalModel.create();
        CategoricalAttribute attribute1 = model.addAttribute();
        assertEquals(0, attribute1.addValue("Test1").index());
        assertEquals(1, attribute1.addValue("Test2").index());
        assertEquals(2, attribute1.addValue("Test3").index());
        CategoricalAttribute attribute2 = model.addAttribute();
        assertEquals(3, attribute2.addValue("Test4").index());
        assertEquals(4, attribute2.addValue("Test5").index());
    }
@ Test public void testIndex ( ) { CategoricalModel model = CategoricalModel . create ( ) ; CategoricalAttribute attribute1 = model . addAttribute ( ) ; assertEquals ( 0 , attribute1 . addValue ( "Test1" ) . index ( ) ) ; assertEquals ( 1 , attribute1 . addValue ( "Test2" ) . index ( ) ) ; assertEquals ( 2 , attribute1 . addValue ( "Test3" ) . index ( ) ) ; CategoricalAttribute attribute2 = model . addAttribute ( ) ; assertEquals ( 3 , attribute2 . addValue ( "Test4" ) . index ( ) ) ; assertEquals ( 4 , attribute2 . addValue ( "Test5" ) . index ( ) ) ; }
Test of index method, of class CategoricalValue.
Test of index method of class CategoricalValue .