package com.specmate.test.integration.support;

import java.util.HashMap;
import java.util.Map;

import org.osgi.service.component.annotations.Component;

import com.specmate.connectors.api.IProjectService;
import com.specmate.connectors.api.IProject;

/**
 * Dummy implementation that does not require the config service. Pulling in the config service in the integration 
 * tests renders manual configuration impossible.
 */
@Component(immediate = true, property= {"service.ranking:Integer=1"})
public class DummyProjectService implements IProjectService {
	private Map<String, IProject> projects = new HashMap<>();

	@Override
	public IProject getProject(String projectName) {
		return projects.get(projectName);
	}
	
	public void addProject(IProject project) {
		projects.put(project.getName(), project);
	}

}

@@ -58,23 +58,74 @@
 va.util.
-HashMap
+ArrayList;%0Aimport java.util.HashMap;%0Aimport java.util.List
 ;%0Aimport
@@ -765,16 +765,166 @@
 );%0A%09%7D%0A%09%0A
+%09@Override%0A%09public List%3CString%3E getProjectNames() %7B%0A%09%09List%3CString%3E names = new ArrayList%3C%3E();%0A%09%09names.addAll(projects.keySet());%0A%09%09return names;%0A%09%7D%0A%09%0A
 %09public 

Fix integration test