> On Wed, 24 Sep 2008 17:51:24 +1200, "Miskell, Craig"
> <[EMAIL PROTECTED]> said:
> > Hi,
> >         I'm writing a test where I need to test that a
> method *isn't*
> >         called (testing scheduled outages).  Is there an
> EasyMock way of
> >         doing that?  I've looked, but no methods jump out at me.
> >
> > Any suggestions?
>
> Easy... create your mock object, don't expect() anything, set it to
> replay(), and then when your test is done, call verify() as
> you normally
> would (or if you are using EasyMockUtils, replayAll(), verifyAll(),
> etc..).  If you set no expectations, EasyMock will expect nothing, and
> by default it will fail fast if something unexpected is called.

Hmmm, that doesn't work as expected (pun unintended).  Or rather, taking some 
of the existing tests, I can comment out some "expect" calls and it will fail 
with an unexpected method call, but commenting out others doesn't fail (i.e. 
the presence or absence of the "expect" call has no effect on the test passing 
or failing).   I'll dig deeper and report back,

>         Good luck!
I may need it ;-)

Craig
=======================================================================
Attention: The information contained in this message and/or attachments
from AgResearch Limited is intended only for the persons or entities
to which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipients is prohibited by AgResearch
Limited. If you have received this message in error, please notify the
sender immediately.
=======================================================================

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Please read the OpenNMS Mailing List FAQ:
http://www.opennms.org/index.php/Mailing_List_FAQ

opennms-devel mailing list

To *unsubscribe* or change your subscription options, see the bottom of this 
page:
https://lists.sourceforge.net/lists/listinfo/opennms-devel

Reply via email to