[logback-dev] Discussion about mock framework ...

Christian Trutz christian.trutz at belaso.de
Mon Jun 18 01:31:52 CEST 2012


Hi Tomasz, hi all,

i introduce the JMockIt framework to logback-extensions [1] because only
with this framework I can
entirely mock out the whole MongoDB API and reach for example for
MongoDBAppenderBase a 100% unit test
coverage, without integration tests.

Christian

[1]
https://github.com/qos-ch/logback-extensions/commit/6607b23249abd3b014d79dff68d72131edc1a01e

2012/6/17 Tomasz Nurkiewicz <nurkiewicz at gmail.com>

> EasyMock seems to be loosing momentum in favour to Mockito (at least
> according to Google Trends and SO questions). Moreover AFAIK PowerMock is
> an extension to existing frameworks (namely EasyMock and Mockito are
> supported), not a framework on its own.
>
> I would actually suggest using one mocking framework for the whole Logback
> umbrella. Otherwise maintaining someone else's tests with mocking framework
> we are unfamiliar with becomes painful.
>
> Talking about testing, some time ago I added FEST assertions [1] to
> Logback, I encourage everyone to use it, library provides very nice fluent
> Java API for assertions:
>
> assertThat(age).isEqualTo(20);
> assertThat(list).hasSize(4);
>
> [1]: http://docs.codehaus.org/**display/FEST/Fluent+**Assertions+Module<http://docs.codehaus.org/display/FEST/Fluent+Assertions+Module>
>
>
> On 17.06.2012 13:51, ceki wrote:
>
>>
>> Joern Huxhorn wrote a few logabck tests using easymock [1]. I don't
>> really know the easymock API but the little I know I don't like that
>> much. If someone is at ease using one mock API or another, let that
>> person hack away with API he/she prefers. So imho if Christian likes
>> jmockit, by all means let him write tests in jmockit. Similarly, if
>> Tony prefers powermock, let him use that. If later a winner emerges,
>> we'll pick the winner. Of course, if we come to an agreement on a
>> single API, that's cool too.
>>
>> [1] http://www.easymock.org/
>>
>>
>
>
> pozdrowienia
>
> --
> Tomasz Nurkiewicz
> http://nurkiewicz.blogspot.com
>
> ______________________________**_________________
> logback-dev mailing list
> logback-dev at qos.ch
> http://mailman.qos.ch/mailman/**listinfo/logback-dev<http://mailman.qos.ch/mailman/listinfo/logback-dev>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-dev/attachments/20120618/2e5ccf91/attachment.html>


More information about the logback-dev mailing list