File: CustomBaseRunner.java

package info (click to toggle)
eclipse-jdt-ui 4.26-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 91,204 kB
  • sloc: java: 816,341; xml: 14,255; jsp: 33; makefile: 5
file content (34 lines) | stat: -rw-r--r-- 1,186 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
/*******************************************************************************
 * Copyright (c) 2020 IBM Corporation and others.
 *
 * This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License 2.0
 * which accompanies this distribution, and is available at
 * https://www.eclipse.org/legal/epl-2.0/
 *
 * SPDX-License-Identifier: EPL-2.0
 *
 * Contributors:
 *     IBM Corporation - initial API and implementation
 *******************************************************************************/
package org.eclipse.jdt.ui.tests;

import org.junit.runner.manipulation.NoTestsRemainException;
import org.junit.runners.BlockJUnit4ClassRunner;
import org.junit.runners.model.InitializationError;

public class CustomBaseRunner extends BlockJUnit4ClassRunner {
	/**
	 * @param klass
	 * @throws InitializationError
	 * @since
	 */
	public CustomBaseRunner(Class<?> klass) throws InitializationError {
        super(klass);
	    try {
	        this.filter(new InheritedTestsFilter());
	    } catch (NoTestsRemainException e) {
	        throw new IllegalStateException("class should contain at least one runnable test", e);
	    }
	}
}