src/main/java/com/greghaskins/spectrum/internal/junit/Rules.java
/**
   * Apply JUnit rules by adding a hook to hook in the rules class.
   * This runs the rules for each atomic.
   * @param rulesClass type of object to create
   * @param target the insertion point to add JUnit rules as hooks
   * @param <T> type of object that will be built
   * @return a supplier that provides access to the test object created
   */
Apply JUnit rules by adding a hook to hook in the rules class.
This runs the rules for each atomic.
@param rulesClass type of object to create
@param target the insertion point to add JUnit rules as hooks
@param  type of object that will be built
@return a supplier that provides access to the test object created
Apply JUnit rules by adding a hook to hook in the rules class . This runs the rules for each atomic . @param rulesClass type of object to create @param target the insertion point to add JUnit rules as hooks @param type of object that will be built @return a supplier that provides access to the test object created
static <T> Supplier<T> applyRules(Class<T> rulesClass, Target target) {
    RuleContext<T> context = new RuleContext<>(rulesClass);
    target.addHook(context.classHook(), HookContext.AppliesTo.ONCE, HookContext.Precedence.LOCAL);
    target.addHook(context.methodHook(), HookContext.AppliesTo.ATOMIC_ONLY,
        HookContext.Precedence.LOCAL);
    return context;
  }
static < T > Supplier < T > applyRules ( Class < T > rulesClass , Target target ) { RuleContext < T > context = new RuleContext < > ( rulesClass ) ; target . addHook ( context . classHook ( ) , HookContext . AppliesTo . ONCE , HookContext . Precedence . LOCAL ) ; target . addHook ( context . methodHook ( ) , HookContext . AppliesTo . ATOMIC_ONLY , HookContext . Precedence . LOCAL ) ; return context ; }
Apply JUnit rules by adding a hook to hook in the rules class.
Apply JUnit rules by adding a hook to hook in the rules class .