« Return to Thread: JMock noob with jmock DAO woes

Re: JMock noob with jmock DAO woes

by Steve Freeman-2 :: Rate this Message:

Reply to Author | View in Thread

Not quite sure what's going on here, but don't panic.

> org.jmock.core.DynamicMockError: mockBullmasterDAO: tried to return  
> null value from method returning int
> Invoked: mockBullmasterDAO.deleteByPrimaryKey(<1L>)


what this says is that you're calling a method deleteByPrimaryKey()  
that should return an int, but that it's been set up to return a null.

In the expectations block, is there a line that looks like:

context.checking(new Expectations() {{
   one(mockBullmasterDAO).deleteByPrimaryKey(1);
}};


S

Steve Freeman
Winner of the Agile Alliance Gordon Pask award 2006

http://www.m3p.co.uk

M3P Limited.
Registered office. 2 Church Street, Burnham, Bucks, SL1 7HZ.
Company registered in England & Wales. Number 03689627



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

    http://xircles.codehaus.org/manage_email


 « Return to Thread: JMock noob with jmock DAO woes