Module org.junit.platform.engine
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
Package
does 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 boolean
equals(Object o)
static PackageSource
from(Package javaPackage)
Create a newPackageSource
using the supplied JavaPackage
.static PackageSource
from(String packageName)
Create a newPackageSource
using the suppliedpackageName
.String
getPackageName()
Get the package name of this test source.int
hashCode()
String
toString()
-
-
-
Method Detail
-
from
public static PackageSource from(Package javaPackage)
Create a newPackageSource
using the supplied JavaPackage
.- Parameters:
javaPackage
- the Java package; must not benull
-
from
public static PackageSource from(String packageName)
Create a newPackageSource
using the suppliedpackageName
.- Parameters:
packageName
- the package name; must not benull
or blank
-
getPackageName
public final String getPackageName()
Get the package name of this test source.
-
-