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 StringPACKAGE_PRIVATE-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format, formatter
-
-
Constructor Summary
Constructors Modifier Constructor Description privateClassModifierShouldBe(Class<?> actual, boolean positive, String modifier)
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static Stringmodifiers(Class<?> actual)static ErrorMessageFactoryshouldBeFinal(Class<?> actual)Creates a new instance for a positive check of thefinalmodifier.static ErrorMessageFactoryshouldBePackagePrivate(Class<?> actual)Creates a new instance for a positive check of thepackage-privatemodifier.static ErrorMessageFactoryshouldBeProtected(Class<?> actual)Creates a new instance for a positive check of theprotectedmodifier.static ErrorMessageFactoryshouldBePublic(Class<?> actual)Creates a new instance for a positive check of thepublicmodifier.static ErrorMessageFactoryshouldNotBeFinal(Class<?> actual)Creates a new instance for a negative check of thefinalmodifier.-
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 thefinalmodifier.- 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 thefinalmodifier.- 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 thepublicmodifier.- 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 theprotectedmodifier.- 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-privatemodifier.- Parameters:
actual- the actual value in the failed assertion.- Returns:
- the created
ErrorMessageFactory.
-
-