List members = catalog.members(new DummyMonitor());
if (!members.isEmpty()) {
//clear the catalog
for (Iterator itr = members.iterator(); itr.hasNext();) {
IService service = (IService)itr.next();
catalog.remove(service);
}
}
members = catalog.members(new DummyMonitor());
assertTrue(members.isEmpty());
final WorkflowWizard workflowWizard = mapImport.getDialog().getWorkflowWizard();
workflowWizard.getWorkflow()
.setContext(context);
mapImport.run(new DummyMonitor(),context);
UDIGTestUtil.inDisplayThreadWait(3000, new WaitCondition(){
public boolean isTrue() {
State state = workflowWizard.getWorkflow().getCurrentState();
if ( state instanceof ResourceSelectionState )
return true;
return false;
}
}, true);
assertTrue(workflowWizard.getWorkflow().getCurrentState() instanceof ResourceSelectionState);
//check the resource page to ensure that it isn't ignored
ResourceSelectionState currentState = (ResourceSelectionState) workflowWizard.getWorkflow().getCurrentState();
assertTrue(currentState.getResources()==null || currentState.getResources().isEmpty());
//Set the resources on the state and press finish
IService service=currentState.getServices().iterator().next();
Map<IGeoResource, IService> resources=new HashMap<IGeoResource, IService>();
for (IResolve resolve : service.resources(new NullProgressMonitor())) {
resources.put((IGeoResource) resolve, service);
}
currentState.setResources(resources);