blob: 197833d9cb459859240d898fa8220cd107af9cd6 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
package org.testng.internal;
import org.testng.ISuite;
import org.testng.TestNGException;
import org.testng.collections.Maps;
import org.testng.xml.XmlSuite;
import java.util.Collection;
import java.util.Map;
public class SuiteRunnerMap {
private Map<String, ISuite> m_map = Maps.newHashMap();
public void put(XmlSuite xmlSuite, ISuite suite) {
final String name = xmlSuite.getName();
if (m_map.containsKey(name)) {
throw new TestNGException("SuiteRunnerMap already have runner for suite " + name);
}
m_map.put(name, suite);
}
public ISuite get(XmlSuite xmlSuite) {
return m_map.get(xmlSuite.getName());
}
public Collection<ISuite> values() {
return m_map.values();
}
}
|