Der einfache Weg eine konkrete Exception zu fangen

9 10 2007
try {
    loginService.changePassword("passwordx".toCharArray(),
        "newpassword".toCharArray(),
        "newpassword".toCharArray());
    fail("Exception expected");
} catch (Exception e) {
    assertEquals("xxx.ber.login.exception.LoginException", e.getClass().getName());
}

Aktionen

Information

Kommentieren