Code example for LoginException

0
 
    /** 
     * @tests javax.security.auth.login.LoginException#LoginException() 
     */ 
    public final void testCtor1() { 
        assertNull(new LoginException().getMessage());
    } 
 
    /** 
     * @tests javax.security.auth.login.LoginException#LoginException( 
     *        java.lang.String) 
     */ 
    public final void testCtor2() { 
        assertNull(new LoginException(null).getMessage());
 
        String message = "";
        assertSame(message, new LoginException(message).getMessage());
 
        message = "message";
        assertSame(message, new LoginException(message).getMessage());
    }