Search in sources :

Example 1 with DataModelCommandBuilder

use of org.kie.workbench.common.screens.datamodeller.client.command.DataModelCommandBuilder in project kie-wb-common by kiegroup.

the class DomainEditorBaseTest method initTest.

@Before
public void initTest() {
    List<DomainHandler> domainHandlers = new ArrayList<>();
    domainHandlers.add(jpaDomainHandler);
    when(jpaDomainHandler.getName()).thenReturn("JPA");
    when(jpaDomainHandler.isDataObjectAuditEnabled()).thenReturn(false);
    when(handlerRegistry.getDomainHandlers()).thenReturn(domainHandlers);
    when(handlerRegistry.getDomainHandlers(anyList())).thenReturn(domainHandlers);
    when(handlerRegistry.getDomainHandlers(anyString())).thenReturn(domainHandlers);
    changeNotifier = new DataModelChangeNotifier(dataModelerEvent);
    commandBuilder = new DataModelCommandBuilder(changeNotifier);
    modelerServiceCaller = new CallerMock<DataModelerService>(modelerService);
    validationServiceCallerMock = new CallerMock<ValidationService>(validationService);
    validatorService = new ValidatorService(validationServiceCallerMock);
    context = createContext();
}
Also used : DataModelCommandBuilder(org.kie.workbench.common.screens.datamodeller.client.command.DataModelCommandBuilder) DataModelerService(org.kie.workbench.common.screens.datamodeller.service.DataModelerService) DataModelChangeNotifier(org.kie.workbench.common.screens.datamodeller.client.command.DataModelChangeNotifier) ValidatorService(org.kie.workbench.common.screens.datamodeller.client.validation.ValidatorService) ArrayList(java.util.ArrayList) DomainHandler(org.kie.workbench.common.screens.datamodeller.client.handlers.DomainHandler) JPADomainHandler(org.kie.workbench.common.screens.datamodeller.client.handlers.jpadomain.JPADomainHandler) ValidationService(org.kie.workbench.common.services.shared.validation.ValidationService) Before(org.junit.Before)

Aggregations

ArrayList (java.util.ArrayList)1 Before (org.junit.Before)1 DataModelChangeNotifier (org.kie.workbench.common.screens.datamodeller.client.command.DataModelChangeNotifier)1 DataModelCommandBuilder (org.kie.workbench.common.screens.datamodeller.client.command.DataModelCommandBuilder)1 DomainHandler (org.kie.workbench.common.screens.datamodeller.client.handlers.DomainHandler)1 JPADomainHandler (org.kie.workbench.common.screens.datamodeller.client.handlers.jpadomain.JPADomainHandler)1 ValidatorService (org.kie.workbench.common.screens.datamodeller.client.validation.ValidatorService)1 DataModelerService (org.kie.workbench.common.screens.datamodeller.service.DataModelerService)1 ValidationService (org.kie.workbench.common.services.shared.validation.ValidationService)1