-
Notifications
You must be signed in to change notification settings - Fork 54
GH-70: Move from hamcrest
to assertj
in flight-sql
#772
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This comment has been minimized.
This comment has been minimized.
containsString("SQL"), // pk_key_name | ||
is("3"), // update_rule | ||
is("3")); // delete_rule | ||
new HamcrestCondition<>(nullValue(String.class)), // pk_catalog_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not particularly certain how to get rid of Hamcrest entirely here. I was aware of HamcrestCondition
so using that, but open to suggestions if anyone knows how this list-based matching can be accomplished solely using assertj.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a list of lambdas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Entirely overlooked that assertj provides lambda based conditions. Changed. Thanks.
I've formatted my changes using |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for doing this!
@@ -247,16 +247,15 @@ private static List<List<String>> getNonConformingResultsForGetSqlInfo( | |||
@Test | |||
public void testGetTablesSchema() { | |||
final FlightInfo info = sqlClient.getTables(null, null, null, null, true); | |||
MatcherAssert.assertThat( | |||
info.getSchemaOptional(), is(Optional.of(FlightSqlProducer.Schemas.GET_TABLES_SCHEMA))); | |||
Assertions.assertThat(info.getSchemaOptional()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit, but IMO it's OK to statically import assertThat
.
containsString("SQL"), // pk_key_name | ||
is("3"), // update_rule | ||
is("3")); // delete_rule | ||
new HamcrestCondition<>(nullValue(String.class)), // pk_catalog_name |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using a list of lambdas?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
What's Changed
Series of PRs to consolidate on using
assertj
in tests as part of #70.