This is an automated email from the ASF dual-hosted git repository. elharo pushed a commit to branch flip in repository https://gitbox.apache.org/repos/asf/maven-deploy-plugin.git
commit f463e6d58214672704016879528f5fab29bb23d8 Author: Elliotte Rusty Harold <elh...@ibiblio.org> AuthorDate: Sun Feb 23 14:08:17 2025 -0500 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..cc20207 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