1/*
2 * Copyright (C) 2016 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 *      http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package vogar.target.junit;
18
19import org.junit.rules.TestRule;
20import org.junit.runner.Runner;
21import org.junit.runners.model.RunnerBuilder;
22
23/**
24 * Parameters for the various vogar {@link Runner} implementation classes.
25 *
26 * <p>RunnerParams can be used to configure {@link RunnerBuilder} instances. RunnerBuilder doesn't
27 * have a method that allows parameters so they must be passed, for example, as a constructor
28 * argument to the RunnerBuilder implementation.
29 */
30public class RunnerParams {
31
32    private final String qualification;
33    private final String[] args;
34    private final TestRule testRule;
35
36    public RunnerParams(String qualification, String[] args, TestRule testRule) {
37        this.qualification = qualification;
38        this.args = args;
39        this.testRule = testRule;
40    }
41
42    public String getQualification() {
43        return qualification;
44    }
45
46    public String[] getArgs() {
47        return args;
48    }
49
50    public TestRule getTestRule() {
51        return testRule;
52    }
53}
54