use of org.kie.workbench.common.services.refactoring.model.query.RefactoringMapPageRow in project kie-wb-common by kiegroup.
the class CalledElementFormProviderTest method setup.
@Before
public void setup() {
calledElementFormProvider.setQueryService(queryService);
List<RefactoringPageRow> results = new ArrayList<RefactoringPageRow>();
RefactoringMapPageRow refactoringMapPageRow = new RefactoringMapPageRow();
Map<String, Path> map = new HashMap<String, Path>();
map.put(ID1, path1);
map.put(ID2, path2);
refactoringMapPageRow.setValue(map);
results.add(refactoringMapPageRow);
when(queryService.query(anyString(), anyObject())).thenReturn(results);
}
use of org.kie.workbench.common.services.refactoring.model.query.RefactoringMapPageRow in project kie-wb-common by kiegroup.
the class FindRuleFlowNamesQueryTest method testExistentGroup.
@Test
public void testExistentGroup() {
properties.add(property);
properties.add(property);
kObjects.add(kObject);
when(kObject.getKey()).thenReturn(FILE_PATH);
List<RefactoringPageRow> list = testedBuilder.buildResponse(kObjects);
assertEquals(2, list.size());
RefactoringMapPageRow row = (RefactoringMapPageRow) list.get(0);
assertMapPageRow(row.getValue());
row = (RefactoringMapPageRow) list.get(1);
assertMapPageRow(row.getValue());
}
use of org.kie.workbench.common.services.refactoring.model.query.RefactoringMapPageRow in project kie-wb-common by kiegroup.
the class FindRuleFlowNamesQueryTest method testNewGroupAdded.
@Test
public void testNewGroupAdded() {
properties.add(property);
kObjects.add(kObject);
when(kObject.getKey()).thenReturn(FILE_PATH);
List<RefactoringPageRow> list = testedBuilder.buildResponse(kObjects);
RefactoringMapPageRow row = (RefactoringMapPageRow) list.get(0);
assertEquals(1, list.size());
Map<?, ?> map = row.getValue();
assertEquals(3, map.size());
assertEquals(FILE_NAME, map.get("filename"));
assertEquals(path.toUri().toString(), map.get("pathuri"));
assertEquals(GROUP_NAME, map.get("name"));
}
use of org.kie.workbench.common.services.refactoring.model.query.RefactoringMapPageRow in project kie-wb-common by kiegroup.
the class ProcessesDataServiceTest method setup.
@Before
public void setup() {
List<RefactoringPageRow> results = new ArrayList<RefactoringPageRow>();
RefactoringMapPageRow refactoringMapPageRow = new RefactoringMapPageRow();
Map<String, Path> map = new HashMap<String, Path>();
map.put(ID1, path1);
map.put(ID2, path2);
refactoringMapPageRow.setValue(map);
results.add(refactoringMapPageRow);
when(queryService.query(anyString(), anyObject())).thenReturn(results);
tested = new ProcessesDataService(queryService, processesUpdatedEvent);
}
Aggregations