use of org.kie.workbench.common.screens.datasource.management.model.DriverDef in project kie-wb-common by kiegroup.
the class DriverDefEditorServiceTest method setup.
@Before
public void setup() {
super.setup();
editorService = new DriverDefEditorServiceImpl(runtimeManager, serviceHelper, ioService, moduleService, optionsFactory, pathNamingService, artifactResolver, newDriverEvent, updateDriverEvent, deleteDriverEvent);
driverDef = new DriverDef();
driverDef.setUuid("uuid");
driverDef.setName("driverName");
driverDef.setDriverClass(TestDriver.class.getName());
driverDef.setGroupId("groupId");
driverDef.setArtifactId("artifactId");
driverDef.setVersion("version");
driverDefEditorContent = new DriverDefEditorContent();
driverDefEditorContent.setDef(driverDef);
driverDefEditorContent.setModule(module);
originalDriverDef = new DriverDef();
originalDriverDef.setUuid("uuid");
originalDriverDef.setName("driverNameOriginal");
originalDriverDef.setDriverClass(TestDriver.class.getName());
originalDriverDef.setGroupId("groupIdOriginal");
originalDriverDef.setArtifactId("artifactIdOriginal");
originalDriverDef.setVersion("versionOriginal");
try {
URL resource = getClass().getClassLoader().getResource("DataSourceFiles");
uri = resource.toURI();
when(artifactResolver.resolve(driverDef.getGroupId(), driverDef.getArtifactId(), driverDef.getVersion())).thenReturn(uri);
} catch (Exception e) {
fail(e.getMessage());
}
}
use of org.kie.workbench.common.screens.datasource.management.model.DriverDef in project kie-wb-common by kiegroup.
the class AbstractDefChangeHandlerTest method setup.
@Before
public void setup() {
setupChangeHandler();
when(serviceHelper.getDefRegistry()).thenReturn(defRegistry);
when(moduleService.resolveModule(path)).thenReturn(module);
when(sessionInfo.getId()).thenReturn(SESSION_ID);
when(sessionInfo.getIdentity()).thenReturn(identity);
when(identity.getIdentifier()).thenReturn(IDENTIFIER);
dataSourceDef = new DataSourceDef();
dataSourceDef.setUuid("uuid");
dataSourceDef.setName("dataSourceName");
dataSourceDef.setConnectionURL("connectionURL");
dataSourceDef.setUser("user");
dataSourceDef.setPassword("password");
driverDef = new DriverDef();
driverDef.setUuid("uuid");
driverDef.setName("driverName");
driverDef.setDriverClass(TestDriver.class.getName());
driverDef.setGroupId("groupId");
driverDef.setArtifactId("artifactId");
driverDef.setVersion("version");
when(registeredDataSourceDef.getUuid()).thenReturn("registeredDataSourceUuid");
when(registeredDataSourceDeploymentInfo.getUuid()).thenReturn("registeredDataSourceUuid");
when(originalDataSourceDef.getUuid()).thenReturn("originalDataSourceUuid");
when(originalDatasourceDeploymentInfo.getUuid()).thenReturn("originalDataSourceUuid");
when(registeredDriverDef.getUuid()).thenReturn("registeredDriverDefUuid");
when(registeredDriverDeploymentInfo.getUuid()).thenReturn("registeredDriverDefUuid");
when(originalDriverDef.getUuid()).thenReturn("originalDriverDefUuid");
when(originalDriverDeploymentInfo.getUuid()).thenReturn("originalDriverDefUuid");
}
use of org.kie.workbench.common.screens.datasource.management.model.DriverDef in project kie-wb-common by kiegroup.
the class DriverDefValidatorTest method setup.
@Before
public void setup() {
driverDef = new DriverDef();
driverDef.setUuid(VALUE);
driverDef.setName(VALUE);
driverDef.setDriverClass(VALUE);
driverDef.setGroupId(VALUE);
driverDef.setArtifactId(VALUE);
driverDef.setVersion(VALUE);
}
Aggregations