Class PackageSource
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.PackageSource
-
- All Implemented Interfaces:
Serializable,TestSource
@API(status=STABLE, since="1.0") public class PackageSource extends Object implements TestSource
Package basedTestSource.This class stores the package name because
Packagedoes not implementSerializable.- Since:
- 1.0
- See Also:
PackageSelector, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static PackageSourcefrom(Package javaPackage)Create a newPackageSourceusing the supplied JavaPackage.static PackageSourcefrom(String packageName)Create a newPackageSourceusing the suppliedpackageName.StringgetPackageName()Get the package name of this test source.inthashCode()StringtoString()
-
-
-
Method Detail
-
from
public static PackageSource from(Package javaPackage)
Create a newPackageSourceusing the supplied JavaPackage.- Parameters:
javaPackage- the Java package; must not benull
-
from
public static PackageSource from(String packageName)
Create a newPackageSourceusing the suppliedpackageName.- Parameters:
packageName- the package name; must not benullor blank
-
getPackageName
public final String getPackageName()
Get the package name of this test source.
-
-