Hi Tomasz, hi all,<div><br></div><div>i introduce the JMockIt framework to logback-extensions [1] because only with this framework I can </div><div>entirely mock out the whole MongoDB API and reach for example for MongoDBAppenderBase a 100% unit test</div>
<div>coverage, without integration tests.</div><div><br></div><div>Christian</div><div><br></div><div>[1] <a href="https://github.com/qos-ch/logback-extensions/commit/6607b23249abd3b014d79dff68d72131edc1a01e">https://github.com/qos-ch/logback-extensions/commit/6607b23249abd3b014d79dff68d72131edc1a01e</a><br>
<br><div class="gmail_quote">2012/6/17 Tomasz Nurkiewicz <span dir="ltr"><<a href="mailto:nurkiewicz@gmail.com" target="_blank">nurkiewicz@gmail.com</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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.<br>

<br>
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.<br>
<br>
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:<br>
<br>
assertThat(age).isEqualTo(20);<br>
assertThat(list).hasSize(4);<br>
<br>
[1]: <a href="http://docs.codehaus.org/display/FEST/Fluent+Assertions+Module" target="_blank">http://docs.codehaus.org/<u></u>display/FEST/Fluent+<u></u>Assertions+Module</a><div class="im"><br>
<br>
On 17.06.2012 13:51, ceki wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Joern Huxhorn wrote a few logabck tests using easymock [1]. I don't<br>
really know the easymock API but the little I know I don't like that<br>
much. If someone is at ease using one mock API or another, let that<br>
person hack away with API he/she prefers. So imho if Christian likes<br>
jmockit, by all means let him write tests in jmockit. Similarly, if<br>
Tony prefers powermock, let him use that. If later a winner emerges,<br>
we'll pick the winner. Of course, if we come to an agreement on a<br>
single API, that's cool too.<br>
<br>
[1] <a href="http://www.easymock.org/" target="_blank">http://www.easymock.org/</a><br>
<br>
</blockquote>
<br>
<br>
<br></div>
pozdrowienia<span class="HOEnZb"><font color="#888888"><br>
<br>
-- <br>
Tomasz Nurkiewicz<br>
<a href="http://nurkiewicz.blogspot.com" target="_blank">http://nurkiewicz.blogspot.com</a></font></span><div class="HOEnZb"><div class="h5"><br>
______________________________<u></u>_________________<br>
logback-dev mailing list<br>
<a href="mailto:logback-dev@qos.ch" target="_blank">logback-dev@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-dev" target="_blank">http://mailman.qos.ch/mailman/<u></u>listinfo/logback-dev</a><br>
</div></div></blockquote></div><br></div>