org.junit.internal.builders.IgnoredClassRunner Java Examples
The following examples show how to use
org.junit.internal.builders.IgnoredClassRunner.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: RunnerBuilder.java From xtext-eclipse with Eclipse Public License 2.0 | 5 votes |
@Override protected IgnoredBuilder ignoredBuilder() { return new IgnoredBuilder() { @Override public Runner runnerForClass(Class<?> testClass) { if (testClass.getAnnotation(Ignore.class) != null || testClass.getAnnotation(IgnoredBySmokeTest.class) != null) return new IgnoredClassRunner(testClass); return null; } }; }
Example #2
Source File: RunnerBuilder.java From xtext-core with Eclipse Public License 2.0 | 5 votes |
@Override protected IgnoredBuilder ignoredBuilder() { return new IgnoredBuilder() { @Override public Runner runnerForClass(Class<?> testClass) { if (testClass.getAnnotation(Ignore.class) != null || testClass.getAnnotation(IgnoredBySmokeTest.class) != null) return new IgnoredClassRunner(testClass); return null; } }; }
Example #3
Source File: NamedParameterizedRunner.java From sql-layer with GNU Affero General Public License v3.0 | 4 votes |
@SuppressWarnings("unused") // Invoked by reflection public NamedParameterizedRunner(Class<?> klass) throws Throwable { super(klass, Collections.<Runner>emptyList()); if (getTestClass().getJavaClass().getAnnotation(Ignore.class) != null) { runners = Collections.unmodifiableList(Arrays.asList((Runner)new IgnoredClassRunner(klass))); return; } List<Runner> localRunners = new LinkedList<>(); Collection<Parameterization> parameterizations = getParameterizations(); checkFailingParameterizations(parameterizations); final String override = System.getProperty(PARAMETERIZATION_OVERRIDE); final boolean overrideIsRegex = (override != null) && paramNameUsesRegex(override); if (override != null) { String msg = "Override is set to"; if (overrideIsRegex) { msg += " regex"; } msg += ":" + override; logger.debug(msg); } for (Parameterization param : parameterizations) { final boolean useThisParam; if (override == null) { useThisParam = true; } else if (overrideIsRegex) { useThisParam = paramNameMatchesRegex(param.getName(), override); } else { useThisParam = param.getName().equals(override); } if (useThisParam) { if (override != null) { logger.debug("Adding parameterization: " + param.getName()); } localRunners.add(new ReifiedParamRunner(getTestClass().getJavaClass(), param, override != null)); } } runners = Collections.unmodifiableList(localRunners); }