Top Description Constructors Methods
org.testng.xml.internal

public final Class XmlSuiteUtils

extends Object
Class Inheritance
Imports
java.util.List, .Set, org.testng.TestNGException, org.testng.collections.Lists, .Sets, org.testng.xml.XmlClass, .XmlSuite, .XmlTest

A utility class to work with XmlSuite

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static void
adjustSuiteNamesToEnsureUniqueness(List<XmlSuite>
- The List of XmlSuite that are to be tested and names updated if duplicate names found.
suites
)

Ensure that two XmlSuite don't have the same name

private static void
private static List<XmlClass>
pack-priv static void
ensureNoDuplicateTestsArePresent(XmlSuite
- The XmlSuite to work with.
xmlSuite
)

Ensures that the current suite doesn't contain any duplicate XmlTest instances.

public static XmlSuite
public static void
validateIfSuitesContainDuplicateTests(List<XmlSuite>
- The list of XmlSuite to validate.
suites
)

A validator that runs through the list of suites and checks if each of the suites contains any XmlTest with the same name.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

XmlSuiteUtilsback to summary
private XmlSuiteUtils()

Method Detail

adjustSuiteNamesToEnsureUniquenessback to summary
public static void adjustSuiteNamesToEnsureUniqueness(List<XmlSuite> suites)

Ensure that two XmlSuite don't have the same name

Parameters
suites:List<XmlSuite>

- The List of XmlSuite that are to be tested and names updated if duplicate names found.

adjustSuiteNamesToEnsureUniquenessback to summary
private static void adjustSuiteNamesToEnsureUniqueness(List<XmlSuite> suites, Set<String> names)
constructXmlClassesUsingback to summary
private static List<XmlClass> constructXmlClassesUsing(List<String> classes)
ensureNoDuplicateTestsArePresentback to summary
pack-priv static void ensureNoDuplicateTestsArePresent(XmlSuite xmlSuite)

Ensures that the current suite doesn't contain any duplicate XmlTest instances. If duplicates are found, then a TestNGException is raised.

Parameters
xmlSuite:XmlSuite

- The XmlSuite to work with.

newXmlSuiteUsingback to summary
public static XmlSuite newXmlSuiteUsing(List<String> classes)
validateIfSuitesContainDuplicateTestsback to summary
public static void validateIfSuitesContainDuplicateTests(List<XmlSuite> suites)

A validator that runs through the list of suites and checks if each of the suites contains any XmlTest with the same name. If found, then a TestNGException is raised.

Parameters
suites:List<XmlSuite>

- The list of XmlSuite to validate.