All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.testng.internal.SuiteRunnerMap Maven / Gradle / Ivy

There is a newer version: 7.10.1
Show newest version
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 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 values() {
    return m_map.values();
  }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy