use of org.ovirt.engine.ui.frontend.communication.OperationProcessor in project ovirt-engine by oVirt.
the class FrontendActionTest method setUp.
@Before
public void setUp() throws Exception {
mockService = mock(GenericApiGWTServiceAsync.class, withSettings().extraInterfaces(ServiceDefTarget.class));
fakeScheduler = new FakeGWTScheduler();
CommunicationProvider communicationsProvider = new GWTRPCCommunicationProvider(mockService, mockXsrfService, mockXsrfRpcRequestBuilder);
// $NON-NLS-1$
when(mockXsrfRpcRequestBuilder.getXsrfToken()).thenReturn(new XsrfToken("Something"));
OperationProcessor operationProcessor = new OperationProcessor(communicationsProvider);
operationProcessor.setScheduler(fakeScheduler);
VdcOperationManager operationsManager = new VdcOperationManager(mockEventBus, operationProcessor);
frontend = new Frontend(operationsManager, mockValidateErrorsTranslator, mockVdsmErrorsTranslator, mockEventBus);
frontend.setEventsHandler(mockEventsHandler);
frontend.setConstants(mockConstants);
frontend.frontendFailureEvent = mockFrontendFailureEvent;
when(mockConstants.noValidateMessage()).thenReturn(NO_MESSAGE);
}
use of org.ovirt.engine.ui.frontend.communication.OperationProcessor in project ovirt-engine by oVirt.
the class FrontendTest method setUp.
@Before
public void setUp() throws Exception {
mockService = mock(GenericApiGWTServiceAsync.class, withSettings().extraInterfaces(ServiceDefTarget.class));
fakeScheduler = new FakeGWTScheduler();
CommunicationProvider communicationsProvider = new GWTRPCCommunicationProvider(mockService, mockXsrfService, mockXsrfRpcRequestBuilder);
// $NON-NLS-1$
when(mockXsrfRpcRequestBuilder.getXsrfToken()).thenReturn(new XsrfToken("Something"));
OperationProcessor operationProcessor = new OperationProcessor(communicationsProvider);
operationProcessor.setScheduler(fakeScheduler);
VdcOperationManager operationsManager = new VdcOperationManager(mockEventBus, operationProcessor);
frontend = new Frontend(operationsManager, mockValidateErrorsTranslator, mockVdsmErrorsTranslator, mockEventBus);
frontend.frontendFailureEvent = mockFrontendFailureEvent;
frontend.frontendNotLoggedInEvent = mockFrontendNotLoggedInEvent;
frontend.setEventsHandler(mockEventsHandler);
frontend.setConstants(mockConstants);
when(mockAsyncQuery.getModel()).thenReturn(ASYNC_OPERATION_TARGET);
when(mockAsyncQuery.getAsyncCallback()).thenReturn(mockAsyncCallback);
}
Aggregations