Package org.assertj.core.error
Class ShouldHaveOnlyElementsOfType
java.lang.Object
org.assertj.core.error.BasicErrorMessageFactory
org.assertj.core.error.ShouldHaveOnlyElementsOfType
- All Implemented Interfaces:
ErrorMessageFactory
Creates an error message indicating that a group does not have an element of the given type.
-
Field Summary
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format
-
Method Summary
Modifier and TypeMethodDescriptionstatic ShouldHaveOnlyElementsOfType
shouldHaveOnlyElementsOfType
(Object actual, Class<?> expectedType, Class<?> unexpectedType) Creates a new
.ShouldHaveOnlyElementsOfType
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
Method Details
-
shouldHaveOnlyElementsOfType
public static ShouldHaveOnlyElementsOfType shouldHaveOnlyElementsOfType(Object actual, Class<?> expectedType, Class<?> unexpectedType) Creates a new
.ShouldHaveOnlyElementsOfType
- Parameters:
actual
- array or IterableexpectedType
- the expected type of all elementsunexpectedType
- the type of one element that is not expectedType or it subclasses.- Returns:
- the created
ErrorMessageFactory
.
-