-
-
Notifications
You must be signed in to change notification settings - Fork 765
Closed
Labels
status: ideal for contributionAn issue that a contributor can help us withAn issue that a contributor can help us with
Description
Feature summary
Improve matching only MapAssert Value Properties.
Example
I feel like this could be one statement
assertThat(cpCard.getAltIds())
.as("AlternateId saved on card")
.hasSize(1); // avoids getAltIds() possible NPE...
assertThat(cpCard.getAltIds().values())
.as("AlternateId saved on Card")
.first()
.returns(LoyaltyCardsValueAltIdsValue.StatusEnum.ACTIVE, LoyaltyCardsValueAltIdsValue::getStatus);It feels like I should be able to do something like. I tried a number of extracting but it all ended up more convoluted than 2 statements, or required a weaker static typing
assertThat(cpCard.getAltIds())
.hasSize(1)
.values()
.first()
.returns(...);Metadata
Metadata
Assignees
Labels
status: ideal for contributionAn issue that a contributor can help us withAn issue that a contributor can help us with