<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 12 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Helvetica;
        panose-1:2 11 6 4 2 2 2 2 2 4;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Verdana;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
h3
        {mso-style-priority:9;
        mso-style-link:"Heading 3 Char";
        mso-margin-top-alt:auto;
        margin-right:0in;
        mso-margin-bottom-alt:auto;
        margin-left:0in;
        font-size:13.5pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}
span.apple-style-span
        {mso-style-name:apple-style-span;}
span.apple-converted-space
        {mso-style-name:apple-converted-space;}
span.Heading3Char
        {mso-style-name:"Heading 3 Char";
        mso-style-priority:9;
        mso-style-link:"Heading 3";
        font-family:"Cambria","serif";
        color:#4F81BD;
        font-weight:bold;}
span.EmailStyle22
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I mean for all possible logic including clients. <o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> jug-bounces@lists.okcjug.org [mailto:jug-bounces@lists.okcjug.org] <b>On Behalf Of </b>Brett L. Schuchert<br><b>Sent:</b> Tuesday, April 12, 2011 12:45 AM<br><b>To:</b> jug@lists.okcjug.org<br><b>Cc:</b> jug@lists.okcjug.org<br><b>Subject:</b> Re: [OKC JUG] Reminder - meeting Tuesday, April 12th<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>By test persistent layer, do you mean test the logic in the persistent layer, or test clients of that layer?<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal style='margin-bottom:12.0pt'>Brett<o:p></o:p></p><div><p class=MsoNormal>Free tutorials:<o:p></o:p></p></div><div><p class=MsoNormal>    <a href="http://schuchert.wikispaces.com">http://schuchert.wikispaces.com</a><o:p></o:p></p></div></div><div><p class=MsoNormal style='margin-bottom:12.0pt'><br>On Apr 11, 2011, at 8:36 PM, Rupesh Bhochhibhoya <<a href="mailto:RBhochhibhoya@telogical.com">RBhochhibhoya@telogical.com</a>> wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><pre style='word-wrap:break-word'><span style='font-family:"Tahoma","sans-serif";color:black'>I have always used nice mocks. And didn't really know why other mocks didn't work well for me. So, thanks for info. <o:p></o:p></span></pre><pre><span style='font-family:"Tahoma","sans-serif";color:black'><o:p> </o:p></span></pre><pre><span style='font-family:"Tahoma","sans-serif";color:black'>Also it would be nice if you could share how to test persistent layer effectively using Jmockit.<o:p></o:p></span></pre><pre><span style='font-family:"Tahoma","sans-serif";color:black'><o:p> </o:p></span></pre><pre><span style='font-family:"Tahoma","sans-serif";color:black'>"Brett L. Schuchert" <<a href="mailto:schuchert@yahoo.com">schuchert@yahoo.com</a>> wrote:<o:p></o:p></span></pre><pre><span style='font-family:"Tahoma","sans-serif";color:black'><o:p> </o:p></span></pre><div><p class=MsoNormal>Might as well start the talk now... <o:p></o:p></p><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>When using mock libraries, by default use "nice" or "not strict" mocks. Most of them default to strict mocks. The problem with this is that doing so makes the tests more fragile and dependent on incidental complexity rather than essential responsibility.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>So in the case of easy mocks, don't use "createMock" by default, instead prefer "createNiceMock". Only use createMock when you really want to verify all messages sent. This is actually a fringe case when doing<b><i> focused</i></b> unit tests. This is typically counter-intuitive. It only becomes clear as individuals move from tests with lots of checks to focused, single-check or single-logical-check based tests.<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>OK, discuss...<o:p></o:p></p></div><div><p class=MsoNormal><o:p> </o:p></p></div><div><p class=MsoNormal>Brett<o:p></o:p></p></div><div><div><div><div><p class=MsoNormal>On Apr 11, 2011, at 11:05 AM 4/11/11, Rupesh Bhochhibhoya wrote:<o:p></o:p></p></div><p class=MsoNormal><br><br><o:p></o:p></p><div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>I appreciate if you can demonstrate  examples with TDD/BDD. And also if you could show its advantages over EasyMock, that will be helpful too.</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Rupesh</span><o:p></o:p></p></div><div><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'> </span><o:p></o:p></p></div><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in;border-width:initial;border-color:initial'><div><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span class=apple-converted-space><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> </span></span><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'><a href="mailto:jug-bounces@lists.okcjug.org">jug-bounces@lists.okcjug.org</a><span class=apple-converted-space> </span>[mailto:jug-bounces@lists.okcjug.org]<span class=apple-converted-space> </span><b>On Behalf Of<span class=apple-converted-space> </span></b>Brett L. Schuchert<br><b>Sent:</b><span class=apple-converted-space> </span>Monday, April 11, 2011 10:52 AM<br><b>To:</b><span class=apple-converted-space> </span><a href="mailto:jug@lists.okcjug.org">jug@lists.okcjug.org</a><br><b>Subject:</b><span class=apple-converted-space> </span>Re: [OKC JUG] Reminder - meeting Tuesday, April 12th</span><o:p></o:p></p></div></div></div><div><p class=MsoNormal> <o:p></o:p></p></div><div><p class=MsoNormal>Oh yeah, I suppose I should prep (mostly kidding).<o:p></o:p></p></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>I already have a "story" for this presentation but I'm open to adjusting if anybody has anything in particular they'd like to me to cover. Just reply to this chain with request.<o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>One thing I will be demonstrating is overriding static methods with the tool - which is cool, too cool, but cool.<o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>Brett<o:p></o:p></p></div><div><div><div><p class=MsoNormal>On Apr 11, 2011, at 10:35 AM 4/11/11, Brian Sheldon wrote:<o:p></o:p></p></div></div><div><p class=MsoNormal><br><br><br><o:p></o:p></p></div><div><div><div><p class=MsoNormal>We have a meeting tomorrow. We will be providing food and drinks this month thanks to MBO sponsoring again this year.<o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><div><p class=MsoNormal>Please go register<span class=apple-converted-space> </span><a href="http://okcjug.org/registration">http://okcjug.org/registration</a> so we know how much food to get and who to pick from for the door prize.<o:p></o:p></p></div></div><div><div><p class=MsoNormal> <o:p></o:p></p></div></div><div><p class=MsoNormal style='text-indent:-.25in;line-height:12.75pt'><span style='font-size:10.0pt;font-family:Symbol;color:#555555'>·</span><span style='font-size:7.0pt;color:#555555'>        <span class=apple-converted-space> </span></span><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:#555555'>Sponsor: <a href="http://www.mbopartners.com/" target="_blank"><span style='color:#2970A6;text-decoration:none'>MBO Partners</span></a></span><o:p></o:p></p></div><div><p class=MsoNormal style='text-indent:-.25in;line-height:12.75pt'><span style='font-size:10.0pt;font-family:Symbol;color:#555555'>·</span><span style='font-size:7.0pt;color:#555555'>        <span class=apple-converted-space> </span></span><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:#555555'>Speaker: <a href="http://okcjug.org/bios/brett-schuchert" target="_blank"><span style='color:#2970A6;text-decoration:none'>Brett Schuchert</span></a></span><o:p></o:p></p></div><div><p class=MsoNormal style='text-indent:-.25in;line-height:12.75pt'><span style='font-size:10.0pt;font-family:Symbol;color:#555555'>·</span><span style='font-size:7.0pt;color:#555555'>        <span class=apple-converted-space> </span></span><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:#555555'><a href="http://code.google.com/p/jmockit/" target="_blank"><span style='color:#2970A6;text-decoration:none'>JMockit</span></a> - Things you shouldn’t do when testing…</span><o:p></o:p></p></div><h3 style='margin:0in;margin-bottom:.0001pt'><span style='font-family:"Arial","sans-serif";color:#555555;letter-spacing:-.6pt'>Agenda</span><o:p></o:p></h3><div><p class=MsoNormal style='text-indent:-.25in;line-height:12.75pt'><span style='font-size:10.0pt;font-family:Symbol;color:#555555'>·</span><span style='font-size:7.0pt;color:#555555'>        <span class=apple-converted-space> </span></span><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:#555555'>11:30 am – Welcome Announcements</span><o:p></o:p></p></div><div><p class=MsoNormal style='text-indent:-.25in;line-height:12.75pt'><span style='font-size:10.0pt;font-family:Symbol;color:#555555'>·</span><span style='font-size:7.0pt;color:#555555'>        <span class=apple-converted-space> </span></span><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:#555555'>11:40 am – Lightning Talks begin</span><o:p></o:p></p></div><div><p class=MsoNormal style='text-indent:-.25in;line-height:12.75pt'><span style='font-size:10.0pt;font-family:Symbol;color:#555555'>·</span><span style='font-size:7.0pt;color:#555555'>        <span class=apple-converted-space> </span></span><span style='font-size:9.0pt;font-family:"Verdana","sans-serif";color:#555555'>12:40 pm – Wrap Up</span><o:p></o:p></p></div><h3 style='margin:0in;margin-bottom:.0001pt'><span style='font-family:"Arial","sans-serif";color:#555555;letter-spacing:-.6pt'>Presentation Information</span><o:p></o:p></h3><h3 style='margin:0in;margin-bottom:.0001pt;line-height:12.75pt'><span style='font-size:10.0pt;font-family:"Arial","sans-serif";color:#555555;letter-spacing:-.6pt;font-weight:normal'>JMockIt is a powerful and easy (perhaps too easy) to use mocking tool that allows you to do things that defy logic. Examples include stubbing static methods, changing final classes and pretty much anything that byte code injection on the fly (per test) allows. We’ll look at some of those things along with more traditional test double creation and then discuss why on the one hand it is nice to have this power, on the other hand you should almost never use it.</span><o:p></o:p></h3><div><p class=MsoNormal><br><span style='color:#888888'>--<span class=apple-converted-space> </span><br>Brian</span><o:p></o:p></p></div></div><div><p class=MsoNormal>_______________________________________________<br>Jug mailing list<br><a href="mailto:Jug@lists.okcjug.org">Jug@lists.okcjug.org</a><br><a href="http://lists.okcjug.org/listinfo.cgi/jug-okcjug.org">http://lists.okcjug.org/listinfo.cgi/jug-okcjug.org</a><o:p></o:p></p></div></div><div><p class=MsoNormal> <o:p></o:p></p></div></div><p class=MsoNormal><span style='font-size:13.5pt;font-family:"Helvetica","sans-serif"'>_______________________________________________<br>Jug mailing list<br><a href="mailto:Jug@lists.okcjug.org">Jug@lists.okcjug.org</a><br><a href="http://lists.okcjug.org/listinfo.cgi/jug-okcjug.org">http://lists.okcjug.org/listinfo.cgi/jug-okcjug.org</a><o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p></div></div></div></div></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><div><p class=MsoNormal>_______________________________________________<br>Jug mailing list<br><a href="mailto:Jug@lists.okcjug.org">Jug@lists.okcjug.org</a><br><a href="http://lists.okcjug.org/listinfo.cgi/jug-okcjug.org">http://lists.okcjug.org/listinfo.cgi/jug-okcjug.org</a><o:p></o:p></p></div></blockquote></div></body></html>