Skip to Main Content
MOCKITO COOKBOOK
book

MOCKITO COOKBOOK

by Marcin Grzejszczak
June 2014
Intermediate to advanced content levelIntermediate to advanced
284 pages
6h 9m
English
Packt Publishing
Content preview from MOCKITO COOKBOOK

Verifying the method invocation within the specified time

Testing asynchronous code is a very broad topic, and we will not go into great details here. The fact is that the best way to test this kind of code is to make it synchronous and test it separately; this is crucial in terms of performance and execution time of unit tests. Imagine having quite a few such cases where you have to wait for a second or so for the test to complete. It would definitely increase the overall time of your tests and you wouldn't want that to happen.

You might, however, have a business requirement where it is crucial to verify whether some particular business feature was executed within the specified time (for example, a request has been sent within one second). In ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Mockito Essentials

Mockito Essentials

Sujoy Acharya
Mockito for Spring

Mockito for Spring

Sujoy Acharya
SPRING COOKBOOK

SPRING COOKBOOK

Jerome Jaglale, Murat Yilmaz

Publisher Resources

ISBN: 9781783982745Supplemental Content