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 Type
    Method
    Description
    createItem(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

      List<T> createItems(List<org.junit.runner.Result> results)
      Creates a list of items based on a list of JUnit test results.
      Parameters:
      results - the list of JUnit Result objects from which to create items
      Returns:
      a list of items of type T created based on the given results
    • createItem

      T createItem(org.junit.runner.Result result, int index)
      Creates a single item based on a JUnit test result and its index.
      Parameters:
      result - the JUnit Result object to base the item on
      index - the index of the result in the list
      Returns:
      an item of type T created based on the given result and index