All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.peterwippermann.junit4.parameterizedsuite.util.SuiteUtil Maven / Gradle / Ivy

Go to download

JUnit 4 provides the commonly known Runners "Suite" and "Parameterized". However, as of today there is no Runner implementation that combines the features of both. This library provides a custom Runner for this purpose.

There is a newer version: 1.1.0
Show newest version
package com.github.peterwippermann.junit4.parameterizedsuite.util;

import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;
import org.junit.runners.model.InitializationError;

/**
 * A collection of useful methods extracted and duplicated from {@link Suite}.
 * 

* Code is under the license of JUnit: http://junit.org/junit4/license.html *

* * Please see the package info of {@link com.github.peterwippermann.junit4.parameterizedsuite.util} for more details. */ public class SuiteUtil { /** * @see Suite#getAnnotatedClasses() */ public static Class[] getSuiteClasses(Class klass) throws InitializationError { SuiteClasses annotation = klass.getAnnotation(SuiteClasses.class); if (annotation == null) { throw new InitializationError(String.format("class '%s' must have a SuiteClasses annotation", klass.getName())); } return annotation.value(); } }





© 2015 - 2025 Weber Informatics LLC | Privacy Policy