Specifying Expectations - suggestion

View: New views
1 Messages — Rating Filter:   Alert me  

Specifying Expectations - suggestion

by Sergey-11 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I have a look at jMock "Specifying Expectations" manual page, and found that
provided code examples are confusing:

public void testReturnsCachedObjectWithinTimeout() {
    checking(new Expectations() {{
        oneOf (clock).time(); will(returnValue(loadTime));
        oneOf (clock).time(); will(returnValue(fetchTime));
           
What is clock here? And what is time()? The same is true for other identifiers
used. I think this example could help only experienced user, but only confuse
novice.




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email