Package org.testng
Class ClassMethodMap
- java.lang.Object
-
- org.testng.ClassMethodMap
-
public class ClassMethodMap extends java.lang.Object
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.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.Map<ITestClass,java.util.Set<java.lang.Object>>
afterClassMethods
private java.util.Map<ITestClass,java.util.Set<java.lang.Object>>
beforeClassMethods
private java.util.Map<java.lang.Object,java.util.Collection<ITestNGMethod>>
classMap
-
Constructor Summary
Constructors Constructor Description ClassMethodMap(java.util.List<ITestNGMethod> methods, XmlMethodSelector xmlMethodSelector)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
java.util.Map<ITestClass,java.util.Set<java.lang.Object>>
getInvokedAfterClassMethods()
java.util.Map<ITestClass,java.util.Set<java.lang.Object>>
getInvokedBeforeClassMethods()
boolean
removeAndCheckIfLast(ITestNGMethod m, java.lang.Object instance)
Remove the method from this map and returns true if it is the last of its class.
-
-
-
Field Detail
-
classMap
private java.util.Map<java.lang.Object,java.util.Collection<ITestNGMethod>> classMap
-
beforeClassMethods
private java.util.Map<ITestClass,java.util.Set<java.lang.Object>> beforeClassMethods
-
afterClassMethods
private java.util.Map<ITestClass,java.util.Set<java.lang.Object>> afterClassMethods
-
-
Constructor Detail
-
ClassMethodMap
public ClassMethodMap(java.util.List<ITestNGMethod> methods, XmlMethodSelector xmlMethodSelector)
-
-
Method Detail
-
removeAndCheckIfLast
public boolean removeAndCheckIfLast(ITestNGMethod m, java.lang.Object instance)
Remove the method from this map and returns true if it is the last of its class.
-
getInvokedBeforeClassMethods
public java.util.Map<ITestClass,java.util.Set<java.lang.Object>> getInvokedBeforeClassMethods()
-
getInvokedAfterClassMethods
public java.util.Map<ITestClass,java.util.Set<java.lang.Object>> getInvokedAfterClassMethods()
-
clear
public void clear()
-
-