« Return to Thread: exactly(n) function in JMock
Nat Pryce wrote:Can you create a small test that reproduces the problem? E.g. one
that fails but should not.
--Nat
2009/5/29 Julien D <myrddin22@hotmail.com>:
>
> This problem seems pretty old. Does anyone know somthing about that ?
>
> For information I use jmock 2.5.1 and jmock-junit4 2.5.1.
>
>
> Julien D wrote:
>>
>> I'm facing the same problem.
>>
>> It seems to be a bug in JMock. See the JIRA
>> http://jira.codehaus.org/browse/JMOCK-129.
>>
>>
>> ravisankarvivek wrote:
>>>
>>> Hi,
>>> I am facing a slightly weird problem. I set an expectation as
>>>
>>> *exactly(n).of(<mock-obj>).f()*
>>>
>>> *Bug*
>>> Suppose the function f() is called 5 times; For any n < 5, the
>>> expectation
>>> fails. However, if I provide the value of n > 5, it passes for all!!
>>> Eg: *exactly(100).of(<mock-obj>).f()*
>>> The above expectation passes, even though the function f() is called only
>>> 5
>>> times!
>>>
>>> Any thoughts ?
>>>
>>> PS: The expectation is under a context and the syntax is perfectly fine.
>>> In
>>> short, the java file compiles fine!
>>>
>>> -Vivek
>>>
>>>
>>
>>
>
> --
> View this message in context: http://www.nabble.com/exactly%28n%29-function-in-JMock-tp20322373p23780192.html
> Sent from the jMock - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe from this list, please visit:
>
> http://xircles.codehaus.org/manage_email
>
>
>
--
http://www.natpryce.com
---------------------------------------------------------------------
To unsubscribe from this list, please visit:
http://xircles.codehaus.org/manage_email
« Return to Thread: exactly(n) function in JMock
| Free embeddable forum powered by Nabble | Forum Help |