Top Description Fields Constructors Methods
org.testng

public Class ClassMethodMap

extends Object
Class Inheritance
Imports
java.util.Collection, .List, .Map, .Set, java.util.concurrent.ConcurrentLinkedQueue, org.testng.collections.Maps, org.testng.internal.XmlMethodSelector

This class maintains a map of <Class, List<ITestNGMethod>>. It is used by TestWorkers to determine if the method they just ran is the last of its class, in which case it's time to invoke all the afterClass methods.
Author
Alex Popescu

Field Summary

Modifier and TypeField and Description
private final Map<ITestClass, Set<Object>>
private final Map<ITestClass, Set<Object>>
private final Map<Object, Collection<ITestNGMethod>>

Constructor Summary

AccessConstructor and Description
public
ClassMethodMap(List<ITestNGMethod> methods, XmlMethodSelector xmlMethodSelector)

Method Summary

Modifier and TypeMethod and Description
public void
public Map<ITestClass, Set<Object>>
public Map<ITestClass, Set<Object>>
public boolean

Returns:

true if it is the last of its class
removeAndCheckIfLast
(ITestNGMethod
The test method
m
,
Object
The test instance
instance
)

Remove the method from this map.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

afterClassMethodsback to summary
private final Map<ITestClass, Set<Object>> afterClassMethods
beforeClassMethodsback to summary
private final Map<ITestClass, Set<Object>> beforeClassMethods
classMapback to summary
private final Map<Object, Collection<ITestNGMethod>> classMap

Constructor Detail

ClassMethodMapback to summary
public ClassMethodMap(List<ITestNGMethod> methods, XmlMethodSelector xmlMethodSelector)

Method Detail

clearback to summary
public void clear()
getInvokedAfterClassMethodsback to summary
public Map<ITestClass, Set<Object>> getInvokedAfterClassMethods()
getInvokedBeforeClassMethodsback to summary
public Map<ITestClass, Set<Object>> getInvokedBeforeClassMethods()
removeAndCheckIfLastback to summary
public boolean removeAndCheckIfLast(ITestNGMethod m, Object instance)

Remove the method from this map.

Parameters
m:ITestNGMethod

The test method

instance:Object

The test instance

Returns:boolean

true if it is the last of its class