Closed ndr-brt closed 3 years ago
At the moment when I need to fail the text context, there's only this method:
public synchronized void failNow(Throwable t)
that forces me, everytime, to specify a throwable, that's not interesting for my test:
test.failNow(new RuntimeException("should fail"));
Can be a good idea to define an utility method, like class Promise defines two tryFail methods: https://github.com/eclipse-vertx/vert.x/blob/ecd0a3b4ca161d5a4727e33b00b5d90daafde8e8/src/main/java/io/vertx/core/Promise.java#L131
Promise
tryFail
Something like:
public synchronized void failNow(String message) { failNow(new NoStackTraceThrowable(message)); }
At the moment when I need to fail the text context, there's only this method:
that forces me, everytime, to specify a throwable, that's not interesting for my test:
Can be a good idea to define an utility method, like class
Promise
defines twotryFail
methods: https://github.com/eclipse-vertx/vert.x/blob/ecd0a3b4ca161d5a4727e33b00b5d90daafde8e8/src/main/java/io/vertx/core/Promise.java#L131Something like: