Skip to content

Commit

Permalink
Rename @classes to @SelectClasses
Browse files Browse the repository at this point in the history
Issue: #312
  • Loading branch information
sbrannen committed Jun 18, 2016
1 parent 3e3e762 commit 2a87be1
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 10 deletions.
Expand Up @@ -10,14 +10,14 @@

package org.junit.gen5.engine.junit4.samples.junit4;

import org.junit.gen5.junit4.runner.Classes;
import org.junit.gen5.junit4.runner.JUnitPlatform;
import org.junit.gen5.junit4.runner.SelectClasses;
import org.junit.runner.RunWith;

/**
* @since 5.0
*/
@RunWith(JUnitPlatform.class)
@Classes(PlainJUnit4TestCaseWithSingleTestWhichFails.class)
@SelectClasses(PlainJUnit4TestCaseWithSingleTestWhichFails.class)
public class TestCaseRunWithJUnitPlatformRunner {
}
Expand Up @@ -62,7 +62,7 @@
* in order to be picked up by IDEs and build tools.
*
* @since 5.0
* @see Classes
* @see SelectClasses
* @see FilterClassName
* @see SelectPackages
* @see IncludeTags
Expand Down Expand Up @@ -185,7 +185,7 @@ private void addExcludedEnginesFilter(TestDiscoveryRequest discoveryRequest) {
}

private Class<?>[] getSelectedClasses() {
return getValueFromAnnotation(Classes.class, Classes::value, EMPTY_CLASS_ARRAY);
return getValueFromAnnotation(SelectClasses.class, SelectClasses::value, EMPTY_CLASS_ARRAY);
}

private String[] getSelectedPackageNames() {
Expand Down
Expand Up @@ -22,20 +22,22 @@
import org.junit.gen5.commons.meta.API;

/**
* {@code @Classes} specifies the test classes to be run when a class
* annotated with {@code @RunWith(JUnitPlatform.class)} is run.
* {@code @SelectClasses} specifies the classes to <em>select</em> when running
* a test suite via {@code @RunWith(JUnitPlatform.class)}.
*
* @since 5.0
* @see org.junit.gen5.engine.discovery.ClassSelector
* @see SelectPackages
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
@Inherited
@Documented
@API(Maintained)
public @interface Classes {
public @interface SelectClasses {

/**
* One or more test classes.
* One or more classes to select.
*/
Class<?>[] value();

Expand Down
Expand Up @@ -27,6 +27,7 @@
*
* @since 5.0
* @see org.junit.gen5.engine.discovery.PackageSelector
* @see SelectClasses
*/
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.TYPE)
Expand Down
Expand Up @@ -89,9 +89,9 @@ class TestCase {
}

@Test
void requestsClassSelectorsWhenClassesAnnotationIsPresent() throws Exception {
void requestsClassSelectorsWhenSelectClassesAnnotationIsPresent() throws Exception {

@Classes({ Short.class, Byte.class })
@SelectClasses({ Short.class, Byte.class })
class TestCase {
}

Expand Down

0 comments on commit 2a87be1

Please sign in to comment.