src/test/java/org/thegalactic/context/constraint/categorical/CategoricalModelTest.java
@Test
    public void testAddAttribute() {
        CategoricalModel model = CategoricalModel.create();
        assertTrue(model.addAttribute() instanceof CategoricalAttribute);
        model.instantiate();
        try {
            model.addAttribute();
            fail("An IllegalStateException must be thrown");
        } catch (IllegalStateException e) {
            assertEquals("This model has already been instantiated", e.getMessage());
        }
    }
/**
     * Test of addAttribute method, of class CategoricalModel.
     */
Test of addAttribute method, of class CategoricalModel.
Test of addAttribute method of class CategoricalModel .
@Test
    public void testAddAttribute() {
        CategoricalModel model = CategoricalModel.create();
        assertTrue(model.addAttribute() instanceof CategoricalAttribute);
        model.instantiate();
        try {
            model.addAttribute();
            fail("An IllegalStateException must be thrown");
        } catch (IllegalStateException e) {
            assertEquals("This model has already been instantiated", e.getMessage());
        }
    }
@ Test public void testAddAttribute ( ) { CategoricalModel model = CategoricalModel . create ( ) ; assertTrue ( model . addAttribute ( ) instanceof CategoricalAttribute ) ; model . instantiate ( ) ; try { model . addAttribute ( ) ; fail ( "An IllegalStateException must be thrown" ) ; } catch ( IllegalStateException e ) { assertEquals ( "This model has already been instantiated" , e . getMessage ( ) ) ; } }
Test of addAttribute method, of class CategoricalModel.
Test of addAttribute method of class CategoricalModel .