-
-
Notifications
You must be signed in to change notification settings - Fork 774
Closed
Labels
status: ideal for contributionAn issue that a contributor can help us withAn issue that a contributor can help us with
Milestone
Description
Feature summary
The AbstractClassAssert lacks with is(Not)Primitive().
Example
assertThat(int.class).isPrimitive();
assertThat(String.class).isNotPrimitive();There is already workarounds for the case, I know.
assertThat(c.isPrimitive()).isTrue();
I just found a case regarding the .as(...).
for (Field file : findSomeSpecificFields()) {
assertThat(field.getType().isPrimitive())
.as("@NullableBySpecification on primitive field: %s", field)
.isFalse();
}which may be more fluent,
for (Field file : findSomeSpecificFields()) {
assertThat(field.getType())
.as("%s annotated with @NullableBySpecification, field)
.isNotPrimitive();
// '...Class#field annotated with @NullableBySpecification should not be primitive.
}Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
status: ideal for contributionAn issue that a contributor can help us withAn issue that a contributor can help us with