Return-Path: X-Original-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-flex-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 155489D04 for ; Thu, 9 Feb 2012 17:58:45 +0000 (UTC) Received: (qmail 78106 invoked by uid 500); 9 Feb 2012 17:58:44 -0000 Delivered-To: apmail-incubator-flex-dev-archive@incubator.apache.org Received: (qmail 77969 invoked by uid 500); 9 Feb 2012 17:58:44 -0000 Mailing-List: contact flex-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: flex-dev@incubator.apache.org Delivered-To: mailing list flex-dev@incubator.apache.org Received: (qmail 77960 invoked by uid 99); 9 Feb 2012 17:58:43 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 17:58:43 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [80.237.132.80] (HELO wp073.webpack.hosteurope.de) (80.237.132.80) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 09 Feb 2012 17:58:34 +0000 Received: from p4aa831.osaknt01.ap.so-net.ne.jp ([120.74.168.49] helo=[192.168.1.21]); authenticated by wp073.webpack.hosteurope.de running ExIM with esmtpsa (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) id 1RvYG5-00066R-Qa; Thu, 09 Feb 2012 18:58:14 +0100 Message-ID: <4F34092B.9030607@leichtgewicht.at> Date: Fri, 10 Feb 2012 02:58:03 +0900 From: Martin Heidegger User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:10.0) Gecko/20120129 Thunderbird/10.0 MIME-Version: 1.0 To: flex-dev@incubator.apache.org Subject: Re: [RT] Recommendation Unit-Test System? References: <4F34036F.7090302@leichtgewicht.at> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-bounce-key: webpack.hosteurope.de;mh@leichtgewicht.at;1328810314;97c21068; X-Virus-Checked: Checked by ClamAV on apache.org On 10/02/2012 02:45, Omar Gonzalez wrote: > I'd definitely used FlexUnit 4. I'm not sure about Mockito though, I've > only used Mockolate. I wonder how they compare. The biggest issue I've seen > people have is this: > > stub(myObj).method("aMagicStringMethodName").returns(someOtherObj); > > Some people have issue w/ the magic strings, does Mockito have a different > approach? > > -omar > The mockito approach is like given( myObj.aMethodCall(possibleArg) ).willReturn(someOtherObj); I do like the approach. My problem with Mockito is that the verification: verify().that( myObj.aMethodCall() ); checks if there was _any_ execution of this method call. Optionally there is inOrder().verify().that( ... ); the way I prefer to do the unit tests. yours Martin.