This is an automated email from the ASF dual-hosted git repository.
elharo pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/maven-deploy-plugin.git
The following commit(s) were added to refs/heads/master by this push:
new 5838dc9 Expected value comes first in JUnit (#108)
5838dc9 is described below
commit 5838dc93b98887e6a1d113e7f48a1a595b80afd2
Author: Elliotte Rusty Harold <[email protected]>
AuthorDate: Mon Feb 24 18:29:57 2025 +0000
Expected value comes first in JUnit (#108)
* Expected value comes first in JUnit
---
.../maven/plugins/deploy/DeployFileMojoTest.java | 1 -
.../apache/maven/plugins/deploy/DeployMojoTest.java | 18 +++++++++---------
2 files changed, 9 insertions(+), 10 deletions(-)
diff --git
a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
index 471c5bd..2bfb8cc 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployFileMojoTest.java
@@ -164,7 +164,6 @@ public class DeployFileMojoTest {
assertEquals("bin", classifier);
String version = (String) getVariableValueFromObject(mojo, "version");
String url = (String) getVariableValueFromObject(mojo, "url");
-
execute(mojo, request -> {
assertNotNull(request);
List<Artifact> artifacts = new ArrayList<>(request.getArtifacts());
diff --git a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
index 61c1d10..413ef0d 100644
--- a/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
+++ b/src/test/java/org/apache/maven/plugins/deploy/DeployMojoTest.java
@@ -199,10 +199,10 @@ public class DeployMojoTest {
MojoException.class,
() -> mojo.getDeploymentRepository(true),
"Should throw: Invalid legacy syntax and layout for
repository.");
- assertEquals(e.getMessage(), "Invalid legacy syntax and layout for
repository.");
+ assertEquals("Invalid legacy syntax and layout for repository.",
e.getMessage());
assertEquals(
- e.getLongMessage(),
- "Invalid legacy syntax and layout for alternative repository.
Use \"altDeploymentRepository::http://localhost\" instead, and only default
layout is supported.");
+ "Invalid legacy syntax and layout for alternative repository.
Use \"altDeploymentRepository::http://localhost\" instead, and only default
layout is supported.",
+ e.getLongMessage());
}
@Test
@@ -215,10 +215,10 @@ public class DeployMojoTest {
MojoException.class,
() -> mojo.getDeploymentRepository(true),
"Should throw: Invalid legacy syntax and layout for
repository.");
- assertEquals(e.getMessage(), "Invalid legacy syntax and layout for
repository.");
+ assertEquals("Invalid legacy syntax and layout for repository.",
e.getMessage());
assertEquals(
- e.getLongMessage(),
- "Invalid legacy syntax and layout for alternative repository.
Use \"altDeploymentRepository::wow::foo::http://localhost\" instead, and only
default layout is supported.");
+ "Invalid legacy syntax and layout for alternative repository.
Use \"altDeploymentRepository::wow::foo::http://localhost\" instead, and only
default layout is supported.",
+ e.getLongMessage());
}
@Test
@@ -242,10 +242,10 @@ public class DeployMojoTest {
MojoException.class,
() -> mojo.getDeploymentRepository(true),
"Should throw: Invalid legacy syntax and layout for
repository.");
- assertEquals(e.getMessage(), "Invalid legacy syntax and layout for
repository.");
+ assertEquals("Invalid legacy syntax and layout for repository.",
e.getMessage());
assertEquals(
- e.getLongMessage(),
- "Invalid legacy syntax and layout for alternative repository.
Use \"altDeploymentRepository::scm:svn:http://localhost\" instead, and only
default layout is supported.");
+ "Invalid legacy syntax and layout for alternative repository.
Use \"altDeploymentRepository::scm:svn:http://localhost\" instead, and only
default layout is supported.",
+ e.getLongMessage());
}
@Test