Code example for FactoryConfigurationError

Methods: getCause, getLocalizedMessage

0
        // case 2: Try to create FactoryConfigurationError 
        // which is based on Exception with String parameter. 
        e = new Exception("test message");
        fce = new FactoryConfigurationError(e);
        assertEquals(e.toString(), fce.getMessage());
        assertEquals(e.toString(), fce.getLocalizedMessage());
        assertEquals(e.getCause(), fce.getCause());
    } 
 
    @TestTargetNew( 
        level = TestLevel.COMPLETE, 
        notes = "", 
        method = "FactoryConfigurationError", 
        args = {java.lang.Exception.class, java.lang.String.class}
    ) 
    public void test_ConstructorLjava_lang_ExceptionLjava_lang_String() { 
        Exception e = new Exception();
        // case 1: Try to create FactoryConfigurationError 
        // which is based on Exception without parameters. 
        FactoryConfigurationError fce = new FactoryConfigurationError(e, "msg");
        assertNotNull(fce.getMessage());