Skip to content

Commit

Permalink
[MNG-7715] Update to resolver 1.9.6 (#1025)
Browse files Browse the repository at this point in the history
Update and apply some adjustments to UTs as
error message did change.

---

https://issues.apache.org/jira/browse/MNG-7715
  • Loading branch information
cstamas committed Mar 6, 2023
1 parent 837db7a commit 366e3f5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
import org.eclipse.aether.impl.RemoteRepositoryManager;
import org.eclipse.aether.repository.RemoteRepository;

import static org.hamcrest.Matchers.startsWith;
import static org.junit.Assert.assertThat;
import static org.hamcrest.MatcherAssert.assertThat;
import static org.hamcrest.Matchers.containsString;

/**
* Test cases for the project {@code ModelResolver} implementation.
Expand Down Expand Up @@ -62,7 +62,7 @@ public void testResolveParentThrowsUnresolvableModelExceptionWhenNotFound() thro
fail("Expected 'UnresolvableModelException' not thrown.");
} catch (final UnresolvableModelException e) {
assertNotNull(e.getMessage());
assertThat(e.getMessage(), startsWith("Could not find artifact org.apache:apache:pom:0 in central"));
assertThat(e.getMessage(), containsString("Could not find artifact org.apache:apache:pom:0 in central"));
}
}

Expand Down Expand Up @@ -125,7 +125,7 @@ public void testResolveDependencyThrowsUnresolvableModelExceptionWhenNotFound()
fail("Expected 'UnresolvableModelException' not thrown.");
} catch (final UnresolvableModelException e) {
assertNotNull(e.getMessage());
assertThat(e.getMessage(), startsWith("Could not find artifact org.apache:apache:pom:0 in central"));
assertThat(e.getMessage(), containsString("Could not find artifact org.apache:apache:pom:0 in central"));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void testResolveParentThrowsUnresolvableModelExceptionWhenNotFound() thro
fail("Expected 'UnresolvableModelException' not thrown.");
} catch (final UnresolvableModelException e) {
assertNotNull(e.getMessage());
assertTrue(e.getMessage().startsWith("Could not find artifact ut.simple:artifact:pom:0 in repo"));
assertTrue(e.getMessage().contains("Could not find artifact ut.simple:artifact:pom:0 in repo"));
}
}

Expand Down Expand Up @@ -119,7 +119,7 @@ public void testResolveDependencyThrowsUnresolvableModelExceptionWhenNotFound()
fail("Expected 'UnresolvableModelException' not thrown.");
} catch (final UnresolvableModelException e) {
assertNotNull(e.getMessage());
assertTrue(e.getMessage().startsWith("Could not find artifact ut.simple:artifact:pom:0 in repo"));
assertTrue(e.getMessage().contains("Could not find artifact ut.simple:artifact:pom:0 in repo"));
}
}

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ under the License.
<securityDispatcherVersion>2.0</securityDispatcherVersion>
<cipherVersion>2.0</cipherVersion>
<jxpathVersion>1.3</jxpathVersion>
<resolverVersion>1.9.5</resolverVersion>
<resolverVersion>1.9.6</resolverVersion>
<slf4jVersion>1.7.36</slf4jVersion>
<xmlunitVersion>2.2.1</xmlunitVersion>
<powermockVersion>1.7.4</powermockVersion>
Expand Down

0 comments on commit 366e3f5

Please sign in to comment.