reject .andReturn then expectLastCall
Brought to you by:
tammofreese
It seems from first glance that this should "not be allowed"
expect(something.something).andReturn(null)
expectLastCall().andThrow(something).
I would have expected this to raise an easy mock "can't do that!" error since I already defined the last call. Maybe force them to use expectLastCallAgain() (since they already defined return for it once).
for instance:
expect(emSession.createProducer(emQueue)).andReturn(emMessageProducer).andThrow(new JMSException("you failed! failed!"));
seems odd to allow.
EasyMock has moved its issue tracking to Codehaus.
Please report the current issue here: http://jira.codehaus.org/browse/EASYMOCK