vert-x / testtools

Vert.x 2.x is deprecated - use instead
http://vertx.io/docs/vertx-unit/java/
Other
10 stars 10 forks source link

Better handling of multiple testComplete calls #10

Open RichardWarburton opened 11 years ago

RichardWarburton commented 11 years ago

I have some tests where I want to have two handlers and check something happens at both of them. At the moment if I put a 'testcomplete()' call at either of the handlers then the test will end without checking the asserts at the other handler.

One potential solution is to have an annotation on the test which declares how many expected testcomplete() handlers there are to be called.

purplefox commented 11 years ago

Yep that makes sense.

As a workaround you could use a counter in your test and not call test complete until the counter reaches the desired value?