> Could you show us the code of the failing test (around line 51) ?

I cleaned up and simplified the code as much as possible. I created a
boolean attribute, wasCalled. I created a callback; in it, I set
wasCalled=true. (So, this is a poor man's mock object...)

The code up to the failure is:

    wasCalled = false;
    lv.loginCallback.onSuccess(null);
    assertTrue(wasCalled);

    wasCalled = false;
    lv.loginButton.click();
    assertTrue(wasCalled);

The first assertTrue(...) succeeds --so I'm sure the callback works--
but the second fails:

junit.framework.AssertionFailedError: null
        at junit.framework.Assert.fail(Assert.java:197)
        at junit.framework.Assert.assertTrue(Assert.java:188)
        at junit.framework.Assert.assertTrue(Assert.java:183)
        at com.fkereki.mvptest.client.LoginViewGwtTest.testLoginView
(LoginViewGwtTest.java:44)
        at
com.fkereki.mvptest.client.__LoginViewGwtTest_unitTestImpl.doRunTest
(transient source for
com.fkereki.mvptest.client.__LoginViewGwtTest_unitTestImpl:7)
        at junit.framework.TestCase.runTest(TestCase.java:62)
        ...etc.

By the way, without the first three lines, the result is exactly the
same.

If I run the actual program, the callback does work (and the user
manages to log in).

Thanks again for your help!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Web Toolkit" 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/google-web-toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to