Top Description Fields Constructors Methods
org.assertj.core.error

public Class ShouldHavePackage

extends BasicErrorMessageFactory
Class Inheritance
Imports
java.util.StringJoiner

Creates an error message indicating that a Class should have a given package.
Author
Matteo Mirk

Field Summary

Modifier and TypeField and Description
private static final String
private static final String
private static final String
Inherited from org.assertj.core.error.BasicErrorMessageFactory:
argumentsformatformatter

Constructor Summary

AccessConstructor and Description
private
ShouldHavePackage(Class<?> actual, String expectedPackage)

private
ShouldHavePackage(Class<?> actual, String expectedPackage, String actualPackage)

Method Summary

Modifier and TypeMethod and Description
public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHavePackage
(Class<?>
the actual value in the failed assertion.
actual
,
Package
the expected package
aPackage
)

Creates a new ShouldHavePackage with a Package instance.

public static ErrorMessageFactory

Returns:

the created ErrorMessageFactory.
shouldHavePackage
(Class<?>
the actual value in the failed assertion.
actual
,
String
the expected package name
packageName
)

Creates a new ShouldHavePackage with a package name.

Inherited from org.assertj.core.error.BasicErrorMessageFactory:
createcreatecreateequalshashCodetoStringunquotedString

Field Detail

BUT_HADback to summary
private static final String BUT_HAD
BUT_HAD_NONEback to summary
private static final String BUT_HAD_NONE
SHOULD_HAVE_PACKAGEback to summary
private static final String SHOULD_HAVE_PACKAGE

Constructor Detail

ShouldHavePackageback to summary
private ShouldHavePackage(Class<?> actual, String expectedPackage)
ShouldHavePackageback to summary
private ShouldHavePackage(Class<?> actual, String expectedPackage, String actualPackage)

Method Detail

shouldHavePackageback to summary
public static ErrorMessageFactory shouldHavePackage(Class<?> actual, Package aPackage)

Creates a new ShouldHavePackage with a Package instance.

Parameters
actual:Class<?>

the actual value in the failed assertion.

aPackage:Package

the expected package

Returns:ErrorMessageFactory

the created ErrorMessageFactory.

shouldHavePackageback to summary
public static ErrorMessageFactory shouldHavePackage(Class<?> actual, String packageName)

Creates a new ShouldHavePackage with a package name.

Parameters
actual:Class<?>

the actual value in the failed assertion.

packageName:String

the expected package name

Returns:ErrorMessageFactory

the created ErrorMessageFactory.