<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Better yet ....<div><br></div><div>Add this annotation to any test using Mockito (better than what I just mailed):</div><div><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-style-span" style="font-family: Monaco; font-size: 14px; "><span style="color: #777777">@RunWith</span>(MockitoJUnitRunner.<span style="color: #a5006a">class</span>)</span></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">That is the "cool kids" way to do it.</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">Custom runners require Java 1.5 or later, of course.</font></div><div><font class="Apple-style-span" face="Monaco"><br></font></div><div><font class="Apple-style-span" face="Monaco">Brett</font></div><div><div><div>On Sep 8, 2009, at 2:26 PM 9/8/09, Ryan Hoegg wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">I apologize for missing today's meeting, I had an urgent issue on my project and couldn't get away.  Please go through Brett's mockito tutorial, but use:<div> <font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-size: small; ">@Mock </span></font><span class="Apple-style-span" style="line-height: 13px; white-space: pre; "><span class="kw2" style="color: rgb(0, 0, 0); "><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-size: small;">private</span></font></span><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-size: small;"> IAccountRepository accountRepository</span></font><span class="sy0" style="color: rgb(51, 153, 51); "><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-size: small;"> </span></font></span></span></div>
<div><span class="Apple-style-span" style="line-height: 13px; white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="line-height: 13px; white-space: pre; "><span class="sy0" style="color: rgb(51, 153, 51); "><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-size: small;"><font class="Apple-style-span">instead of </font></span></font></span></span></div>
<div><span class="Apple-style-span" style="line-height: 13px; white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="line-height: 13px; white-space: pre; "><span class="sy0" style="color: rgb(51, 153, 51); "><font class="Apple-style-span" face="arial, helvetica, sans-serif"><span class="Apple-style-span" style="font-size: small;"><font class="Apple-style-span">accountRepository = mock(IAccountRepository.class)</font></span></font></span></span></div>
<div><span class="Apple-style-span" style="line-height: 13px; white-space: pre;"><br></span></div><div><span class="Apple-style-span" style="line-height: 13px; white-space: pre;">See you next month.</span></div><div><span class="Apple-style-span" style="line-height: 13px; white-space: pre;"><br>
</span></div><div><span class="Apple-style-span" style="line-height: 13px; white-space: pre;"><a href="http://schuchert.wikispaces.com/Mockito.LoginServiceExample">http://schuchert.wikispaces.com/Mockito.LoginServiceExample</a></span></div>
_______________________________________________<br>Jug mailing list<br><a href="mailto:Jug@lists.okcjug.org">Jug@lists.okcjug.org</a><br>http://lists.okcjug.org/listinfo.cgi/jug-okcjug.org<br></blockquote></div><br></div></body></html>