Hey Jeff.. some time ago I had some similar problems - these went away when I swopped the J2EE jar/library on the classpath to the one from jBoss. (you  probably now incorporated the tests into your project?) There seem to be some incompatibities with different versions of J2ee implementations.. The solution was to run the tests from Ant script and be able to swop the weblogic jar with the jboss one... hope that helps C.

On 9/8/06, Jeff Mutonho <[EMAIL PROTECTED]> wrote:

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