mirror of https://github.com/apache/maven.git
[MNG-7715] Update to resolver 1.9.6 (#1036)
Adjust some UTs as error message did change. --- https://issues.apache.org/jira/browse/MNG-7715
This commit is contained in:
parent
0dd9ebc126
commit
c1dfb947b5
|
@ -37,7 +37,7 @@ import org.junit.jupiter.api.Test;
|
|||
|
||||
import static org.codehaus.plexus.testing.PlexusExtension.getBasedir;
|
||||
import static org.hamcrest.MatcherAssert.assertThat;
|
||||
import static org.hamcrest.Matchers.startsWith;
|
||||
import static org.hamcrest.Matchers.containsString;
|
||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||
import static org.junit.jupiter.api.Assertions.assertNotNull;
|
||||
import static org.junit.jupiter.api.Assertions.assertThrows;
|
||||
|
@ -69,7 +69,7 @@ public class ProjectModelResolverTest extends AbstractMavenProjectTestCase {
|
|||
() -> newModelResolver().resolveModel(parent.getDelegate(), new AtomicReference<>()),
|
||||
"Expected 'UnresolvableModelException' not thrown.");
|
||||
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"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -135,7 +135,7 @@ public class ProjectModelResolverTest extends AbstractMavenProjectTestCase {
|
|||
() -> newModelResolver().resolveModel(dependency.getDelegate(), new AtomicReference<>()),
|
||||
"Expected 'UnresolvableModelException' not thrown.");
|
||||
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"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
|
@ -65,7 +65,7 @@ public final class DefaultModelResolverTest extends AbstractRepositoryTestCase {
|
|||
() -> newModelResolver().resolveModel(parent, new AtomicReference<>()),
|
||||
"Expected 'UnresolvableModelException' not thrown.");
|
||||
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"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
@ -138,7 +138,7 @@ public final class DefaultModelResolverTest extends AbstractRepositoryTestCase {
|
|||
() -> newModelResolver().resolveModel(dependency, new AtomicReference<>()),
|
||||
"Expected 'UnresolvableModelException' not thrown.");
|
||||
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"));
|
||||
}
|
||||
|
||||
@Test
|
||||
|
|
2
pom.xml
2
pom.xml
|
@ -166,7 +166,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.6.4</xmlunitVersion>
|
||||
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
|
||||
|
|
Loading…
Reference in New Issue