Package org.assertj.core.error
Class ClassModifierShouldBe
- java.lang.Object
-
- org.assertj.core.error.BasicErrorMessageFactory
-
- org.assertj.core.error.ClassModifierShouldBe
-
- All Implemented Interfaces:
ErrorMessageFactory
public class ClassModifierShouldBe extends BasicErrorMessageFactory
Error message factory for an assertion which checks that a class has (or has not) a specific modifier.- Author:
- Michal Kordas
-
-
Field Summary
Fields Modifier and Type Field Description private static String
PACKAGE_PRIVATE
-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
-
Constructor Summary
Constructors Modifier Constructor Description private
ClassModifierShouldBe(Class<?> actual, boolean positive, String modifier)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static String
modifiers(Class<?> actual)
static ErrorMessageFactory
shouldBeFinal(Class<?> actual)
Creates a new instance for a positive check of thefinal
modifier.static ErrorMessageFactory
shouldBePackagePrivate(Class<?> actual)
Creates a new instance for a positive check of thepackage-private
modifier.static ErrorMessageFactory
shouldBeProtected(Class<?> actual)
Creates a new instance for a positive check of theprotected
modifier.static ErrorMessageFactory
shouldBePublic(Class<?> actual)
Creates a new instance for a positive check of thepublic
modifier.static ErrorMessageFactory
shouldNotBeFinal(Class<?> actual)
Creates a new instance for a negative check of thefinal
modifier.-
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
-
-
-
Field Detail
-
PACKAGE_PRIVATE
private static final String PACKAGE_PRIVATE
- See Also:
- Constant Field Values
-
-
Method Detail
-
shouldBeFinal
public static ErrorMessageFactory shouldBeFinal(Class<?> actual)
Creates a new instance for a positive check of thefinal
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldNotBeFinal
public static ErrorMessageFactory shouldNotBeFinal(Class<?> actual)
Creates a new instance for a negative check of thefinal
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBePublic
public static ErrorMessageFactory shouldBePublic(Class<?> actual)
Creates a new instance for a positive check of thepublic
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBeProtected
public static ErrorMessageFactory shouldBeProtected(Class<?> actual)
Creates a new instance for a positive check of theprotected
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
shouldBePackagePrivate
public static ErrorMessageFactory shouldBePackagePrivate(Class<?> actual)
Creates a new instance for a positive check of thepackage-private
modifier.- Parameters:
actual
- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory
.
-
-