Search in sources :

Example 1 with AsyncOperationCompleteEvent

use of org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent in project ovirt-engine by oVirt.

the class FrontendActionTest method tearDown.

@After
public void tearDown() throws Exception {
    // Make sure that the query start and end have not been called.
    verify(mockEventBus, never()).fireEvent(new AsyncOperationCompleteEvent(testState, false, true));
    verify(mockEventBus, never()).fireEvent(new AsyncOperationCompleteEvent(testState, false, false));
}
Also used : AsyncOperationCompleteEvent(org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent) After(org.junit.After)

Example 2 with AsyncOperationCompleteEvent

use of org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent in project ovirt-engine by oVirt.

the class FrontendTest method verifyAsyncQueryFailed.

private void verifyAsyncQueryFailed() {
    verify(mockEventBus, never()).fireEvent(new AsyncOperationCompleteEvent(mockAsyncQuery.getModel(), false, true));
    verify(mockEventBus, atLeastOnce()).fireEvent(new AsyncOperationCompleteEvent(mockAsyncQuery.getModel(), false, false));
}
Also used : AsyncOperationCompleteEvent(org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent)

Example 3 with AsyncOperationCompleteEvent

use of org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent in project ovirt-engine by oVirt.

the class FrontendActionTest method verifyAsyncActionStartedAndSucceeded.

private void verifyAsyncActionStartedAndSucceeded() {
    verifyAsyncActionStarted();
    verify(mockEventBus, atLeastOnce()).fireEvent(new AsyncOperationCompleteEvent(testState, true, true));
    verify(mockEventBus, never()).fireEvent(new AsyncOperationCompleteEvent(testState, true, false));
}
Also used : AsyncOperationCompleteEvent(org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent)

Example 4 with AsyncOperationCompleteEvent

use of org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent in project ovirt-engine by oVirt.

the class FrontendActionTest method verifyAsyncActionStartedAndFailed.

private void verifyAsyncActionStartedAndFailed() {
    verifyAsyncActionStarted();
    verify(mockEventBus, never()).fireEvent(new AsyncOperationCompleteEvent(testState, true, true));
    verify(mockEventBus, atLeastOnce()).fireEvent(new AsyncOperationCompleteEvent(testState, true, false));
}
Also used : AsyncOperationCompleteEvent(org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent)

Example 5 with AsyncOperationCompleteEvent

use of org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent in project ovirt-engine by oVirt.

the class FrontendActionTest method verifyAsyncActionStartedButNotCompleted.

private void verifyAsyncActionStartedButNotCompleted() {
    verifyAsyncActionStarted();
    verify(mockEventBus, never()).fireEvent(new AsyncOperationCompleteEvent(testState, true, true));
    verify(mockEventBus, never()).fireEvent(new AsyncOperationCompleteEvent(testState, true, false));
}
Also used : AsyncOperationCompleteEvent(org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent)

Aggregations

AsyncOperationCompleteEvent (org.ovirt.engine.ui.frontend.communication.AsyncOperationCompleteEvent)7 After (org.junit.After)2 AsyncOperationStartedEvent (org.ovirt.engine.ui.frontend.communication.AsyncOperationStartedEvent)1