Search in sources :

Example 1 with AclNotFoundException

use of java.security.acl.AclNotFoundException in project robovm by robovm.

the class AclNotFoundExceptionTest method testAclNotFoundException.

/**
     * check default constructor
     */
public void testAclNotFoundException() {
    assertNotNull(new AclNotFoundException());
    assertNull(new AclNotFoundException().getMessage());
    assertNull(new AclNotFoundException().getCause());
}
Also used : AclNotFoundException(java.security.acl.AclNotFoundException)

Example 2 with AclNotFoundException

use of java.security.acl.AclNotFoundException in project core-java by SpineEventEngine.

the class VerifyShould method fail_assertThrowsWithCause_if_callable_throws_exception_with_different_causes.

@Test(expected = AssertionError.class)
public void fail_assertThrowsWithCause_if_callable_throws_exception_with_different_causes() {
    final Throwable expectedCause = new EmptyStackException();
    final Throwable actualCause = new AclNotFoundException();
    final RuntimeException runtimeException = new RuntimeException(actualCause);
    final Callable throwsRuntimeException = new Callable() {

        @Override
        public Object call() {
            throw runtimeException;
        }
    };
    assertThrowsWithCause(runtimeException.getClass(), expectedCause.getClass(), throwsRuntimeException);
}
Also used : EmptyStackException(java.util.EmptyStackException) AclNotFoundException(java.security.acl.AclNotFoundException) Callable(java.util.concurrent.Callable) Test(org.junit.Test)

Aggregations

AclNotFoundException (java.security.acl.AclNotFoundException)2 EmptyStackException (java.util.EmptyStackException)1 Callable (java.util.concurrent.Callable)1 Test (org.junit.Test)1