Search in sources :

Example 1 with NoStackTraceThrowable

use of io.vertx.core.impl.NoStackTraceThrowable in project vert.x by eclipse.

the class FutureTest method testFailureFutureWithNullFailure.

@Test
public void testFailureFutureWithNullFailure() {
    Future<String> future = Future.future();
    future.fail((Throwable) null);
    Checker<String> checker = new Checker<>(future);
    NoStackTraceThrowable failure = (NoStackTraceThrowable) checker.assertFailed();
    assertNull(failure.getMessage());
}
Also used : NoStackTraceThrowable(io.vertx.core.impl.NoStackTraceThrowable) Test(org.junit.Test)

Example 2 with NoStackTraceThrowable

use of io.vertx.core.impl.NoStackTraceThrowable in project vert.x by eclipse.

the class FutureTest method testCreateFailedWithNullFailure.

@Test
public void testCreateFailedWithNullFailure() {
    Future<String> future = Future.failedFuture((Throwable) null);
    Checker<String> checker = new Checker<>(future);
    NoStackTraceThrowable failure = (NoStackTraceThrowable) checker.assertFailed();
    assertNull(failure.getMessage());
}
Also used : NoStackTraceThrowable(io.vertx.core.impl.NoStackTraceThrowable) Test(org.junit.Test)

Aggregations

NoStackTraceThrowable (io.vertx.core.impl.NoStackTraceThrowable)2 Test (org.junit.Test)2