The method getAccountByAccountKey  below is where  I'm getting  the  " unexpected invocation"  error


mockLinkedServiceAccountDao = mock(LinkedServiceAccountDao.class);

mockLinkedServiceAccountDao.verify();

linkedServiceAccountDao = (LinkedServiceAccountDao) mockLinkedServiceAccountDao.proxy();

accountId = ((Account) linkedServiceAccountDao.getAccountByAccountKey(ban).get(0)).getId();

System.out.println("## accountId : " + accountId.toString());

mockLinkedServiceAccountDao.expects(once()).method("getAccountByAccountKey").with(eq(new Long(1))).will(returnValue(accountId));



junit ] Testcase: test1 took 0.14 sec

    [ junit ] FAILED

    [ junit ] mockLinkedServiceAccountDao: unexpected invocation

    [ junit ] Invoked: mockLinkedServiceAccountDao.getAccountByAccountKey("1234567890")

    [ junit ] Allowed:

    [ junit ] No expectations set

    [ junit ] org.jmock.core.DynamicMockError: mockLinkedServiceAccountDao: unexpected invocation

    [ junit ] Invoked: mockLinkedServiceAccountDao.getAccountByAccountKey("1234567890")

    [ junit ] Allowed:

    [ junit ] No expectations set

    [ junit ] at org.jmock.core.AbstractDynamicMock.mockInvocation( AbstractDynamicMock.java:95


--

What's causing this?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "CTJUG Forum" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/CTJUG-Forum
For the ctjug home page see http://www.ctjug.org.za
-~----------~----~----~----~------~----~------~--~---

Reply via email to