Package org.assertj.core.error
Class ShouldOnlyHaveFields
- java.lang.Object
-
- org.assertj.core.error.BasicErrorMessageFactory
-
- org.assertj.core.error.ShouldOnlyHaveFields
-
- All Implemented Interfaces:
ErrorMessageFactory
public class ShouldOnlyHaveFields extends BasicErrorMessageFactory
Creates an error message indicating that an assertion that verifies that a class has only the fields.- Author:
- Filip Hrisafov
-
-
Field Summary
-
Fields inherited from class org.assertj.core.error.BasicErrorMessageFactory
arguments, format
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static ErrorMessageFactoryshouldOnlyHaveDeclaredFields(Class<?> actual, Collection<String> expected, Collection<String> notFound, Collection<String> notExpected)Creates a newShouldOnlyHaveFields.static ErrorMessageFactoryshouldOnlyHaveFields(Class<?> actual, Collection<String> expected, Collection<String> notFound, Collection<String> notExpected)Creates a newShouldOnlyHaveFields.-
Methods inherited from class org.assertj.core.error.BasicErrorMessageFactory
create, create, create, equals, hashCode, toString, unquotedString
-
-
-
-
Method Detail
-
shouldOnlyHaveFields
public static ErrorMessageFactory shouldOnlyHaveFields(Class<?> actual, Collection<String> expected, Collection<String> notFound, Collection<String> notExpected)
Creates a newShouldOnlyHaveFields.- Parameters:
actual- the actual value in the failed assertion.expected- expected fields for this classnotFound- fields inexpectednot found in theactual.notExpected- fields in theactualthat were not inexpected.- Returns:
- the created
ErrorMessageFactory.
-
shouldOnlyHaveDeclaredFields
public static ErrorMessageFactory shouldOnlyHaveDeclaredFields(Class<?> actual, Collection<String> expected, Collection<String> notFound, Collection<String> notExpected)
Creates a newShouldOnlyHaveFields.- Parameters:
actual- the actual value in the failed assertion.expected- expected fields for this classnotFound- fields inexpectednot found in theactual.notExpected- fields in theactualthat were not inexpected.- Returns:
- the created
ErrorMessageFactory.
-
-