rfscholte commented on a change in pull request #83:
URL: https://github.com/apache/maven-resolver/pull/83#discussion_r548436414
##########
File path:
maven-resolver-impl/src/test/java/org/eclipse/aether/internal/impl/DefaultChecksumPolicyProviderTest.java
##########
@@ -133,10 +135,12 @@ public void
testGetEffectiveChecksumPolicy_UnknownPolicies()
{ RepositoryPolicy.CHECKSUM_POLICY_IGNORE,
RepositoryPolicy.CHECKSUM_POLICY_IGNORE } };
for ( String[] testCase : testCases )
{
- assertEquals( "unknown vs " + testCase[1], testCase[0],
- provider.getEffectiveChecksumPolicy( session,
CHECKSUM_POLICY_UNKNOWN, testCase[1] ) );
- assertEquals( "unknown vs " + testCase[1], testCase[0],
- provider.getEffectiveChecksumPolicy( session,
testCase[1], CHECKSUM_POLICY_UNKNOWN ) );
+ IllegalArgumentException e = assertThrows(
IllegalArgumentException.class,
+ () -> provider.getEffectiveChecksumPolicy( session,
CHECKSUM_POLICY_UNKNOWN, testCase[1] ) );
+ assertThat( e.getMessage(), is("Unsupported policy: unknown") );
Review comment:
I didn't notice the static import of `assertThrows`, which is caused by
an existing wildcard import. Please make imports explicit.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]