vendredi 8 janvier 2016

Get stucked in new MockUp Call

@Test
public void testMockUp() {
    try {
        System.out.println("abcdefg");
        new MockUp<TransactionAlert>() {
            @Mock(invocations = 1)
            public void run() {
                System.out.println("i am runing");
            }
        };
        System.out.println("hijklmn");
    } catch (Exception e) {
        e.printStackTrace();
    }
}

The code above get stuck in the new MockUp<> statement.In the console, i can only see the first output statement "abcdefg" rather than "hijklmn".

And i also try to set break and use the debugger to trace how the program run.Turns out after invoke the MockUp class static initialization, the program seems to be stuck.No Expception throw, no stop, just hang in there.

Thanks for your help!

Aucun commentaire:

Enregistrer un commentaire