Package com.gophers.interfaces
Interface Factory<T>
- Type Parameters:
T- the type of item to be created by the factory
- All Known Implementing Classes:
AbstractGradeFactory,GradeFactory
public interface Factory<T>
The Factory interface defines methods for creating items or a collection of
items
based on JUnit test results.
-
Method Summary
Modifier and TypeMethodDescriptioncreateItem(org.junit.runner.Result result, int index) Creates a single item based on a JUnit test result and its index.createItems(List<org.junit.runner.Result> results) Creates a list of items based on a list of JUnit test results.
-
Method Details
-
createItems
Creates a list of items based on a list of JUnit test results.- Parameters:
results- the list of JUnitResultobjects from which to create items- Returns:
- a list of items of type
Tcreated based on the given results
-
createItem
Creates a single item based on a JUnit test result and its index.- Parameters:
result- the JUnitResultobject to base the item onindex- the index of the result in the list- Returns:
- an item of type
Tcreated based on the given result and index
-