Package org.testng.internal
Class TestMethodContainer
java.lang.Object
org.testng.internal.TestMethodContainer
- All Implemented Interfaces:
IContainer<ITestNGMethod>
This implementation leverages a supplier to lazily load the test methods (data) for the very
first time and "remembers it" for later invocations. If the user clears the data (the one that we
were remembering) then, it resorts to just using the supplier to provide on-demand evaluation of
test methods. This implementation is built such that once its been asked to forget the data, it
no longer caches it anymore.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private ITestNGMethod[]
private final Supplier<ITestNGMethod[]>
-
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
methods
-
supplier
-
isCleared
private boolean isCleared
-
-
Constructor Details
-
TestMethodContainer
-
-
Method Details
-
getItems
- Specified by:
getItems
in interfaceIContainer<ITestNGMethod>
- Returns:
- - Retrieves data from the container
-
isCleared
public boolean isCleared()- Specified by:
isCleared
in interfaceIContainer<ITestNGMethod>
- Returns:
- -
true
if the container items were cleared.
-
clearItems
public void clearItems()Description copied from interface:IContainer
Clears the container- Specified by:
clearItems
in interfaceIContainer<ITestNGMethod>
-