import static junit.framework.Assert.*;
+import java.util.ArrayList;
import java.util.Collection;
-import java.util.HashMap;
-import java.util.LinkedHashMap;
-import java.util.Map;
+import java.util.List;
import javax.xml.transform.dom.DOMSource;
}
@Override
- public String getName() {
- return "myname";
+ public Id<Transformation> getId() {
+ return new Id<Transformation>("myname");
}
@Override
private TransformationPaths transformations;
- private Map<Id<Transformation>, Transformation> createTransformations(
- long aStartId, Transformation... aTransformations) {
- Map<Id<Transformation>, Transformation> res = new LinkedHashMap<Id<Transformation>, Transformation>();
+ private List<Transformation> createTransformations(long aStartId,
+ Transformation... aTransformations) {
+ List<Transformation> res = new ArrayList<Transformation>();
- long id = aStartId;
for (Transformation t : aTransformations) {
- res.put(new Id<Transformation>(id++), t);
+ res.add(t);
}
return res;
}
@Test
public void testWithoutTransformations() {
transformations = new TransformationPaths(
- new HashMap<Id<Transformation>, Transformation>());
+ new ArrayList<Transformation>());
Collection<String> res = transformations.getPossibleTargetTypes("a");
assertEquals(1, res.size());