Tuesday 31 July 2012

Mockito Matchers

When using Mockito you can use MockitoMatchers. You can use predefined ones or create own implementation.
F.e.
assertThat(object, CoreMatchers.equalTo(0));
More examples as well as own implementations here: http://docs.mockito.googlecode.com/hg/org/mockito/Matchers.html

No comments: