• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4 
5 package org.chromium.base.test.params;
6 
7 import org.junit.runners.model.FrameworkMethod;
8 
9 import org.chromium.base.test.params.ParameterizedRunner.ParameterizedTestInstantiationException;
10 
11 import java.util.List;
12 
13 /**
14  * This interface defines the methods that needs to be overriden for a Runner to
15  * be used by ParameterizedRunner to generate individual runners for parameters.
16  *
17  * To create a ParameterizedRunnerDelegate, extends from any BlockJUnit4Runner
18  * children class. You can copy all the implementation from
19  * org.chromium.base.test.params.BaseJUnit4RunnerDelegate.
20  */
21 public interface ParameterizedRunnerDelegate {
22     /**
23      * Override to use DelegateCommon's implementation
24      */
collectInitializationErrors(List<Throwable> errors)25     void collectInitializationErrors(List<Throwable> errors);
26 
27     /**
28      * Override to use DelegateCommon's implementation
29      */
computeTestMethods()30     List<FrameworkMethod> computeTestMethods();
31 
32     /**
33      * Override to use DelegateCommon's implementation
34      */
createTest()35     Object createTest() throws ParameterizedTestInstantiationException;
36 }
37