Code example for NoSuchProviderException

Methods: getCause, getMessage

0
    /** 
     * Test for <code>NoSuchProviderException()</code> constructor Assertion: 
     * constructs NoSuchProviderException with no detail message 
     */ 
    public void testNoSuchProviderException01() { 
        NoSuchProviderException tE = new NoSuchProviderException();
        assertNull("getMessage() must return null.", tE.getMessage());
        assertNull("getCause() must return null", tE.getCause());
    } 
 
    /** 
     * Test for <code>NoSuchProviderException(String)</code> constructor 
     * Assertion: constructs NoSuchProviderException with detail message msg. 
     * Parameter <code>msg</code> is not null. 
     */ 
    public void testNoSuchProviderException02() { 
        NoSuchProviderException tE;
        for (int i = 0; i < msgs.length; i++) {
            tE = new NoSuchProviderException(msgs[i]);
            assertEquals("getMessage() must return: ".concat(msgs[i]), tE
                    .getMessage(), msgs[i]);