tomee-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rmannibu...@apache.org
Subject tomee git commit: debug in asserts in StripVersionTest
Date Wed, 15 Jun 2016 17:54:44 GMT
Repository: tomee
Updated Branches:
  refs/heads/master f900f16fd -> 066da5ed0


debug in asserts in StripVersionTest


Project: http://git-wip-us.apache.org/repos/asf/tomee/repo
Commit: http://git-wip-us.apache.org/repos/asf/tomee/commit/066da5ed
Tree: http://git-wip-us.apache.org/repos/asf/tomee/tree/066da5ed
Diff: http://git-wip-us.apache.org/repos/asf/tomee/diff/066da5ed

Branch: refs/heads/master
Commit: 066da5ed090e58c713e6b9f69a53de5e98f6e2a5
Parents: f900f16
Author: Romain manni-Bucau <rmannibucau@gmail.com>
Authored: Wed Jun 15 19:54:32 2016 +0200
Committer: Romain manni-Bucau <rmannibucau@gmail.com>
Committed: Wed Jun 15 19:54:32 2016 +0200

----------------------------------------------------------------------
 .../maven/plugin/test/StripVersionTest.java     | 28 ++++----------------
 1 file changed, 5 insertions(+), 23 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tomee/blob/066da5ed/maven/tomee-maven-plugin/src/test/java/org/apache/openejb/maven/plugin/test/StripVersionTest.java
----------------------------------------------------------------------
diff --git a/maven/tomee-maven-plugin/src/test/java/org/apache/openejb/maven/plugin/test/StripVersionTest.java
b/maven/tomee-maven-plugin/src/test/java/org/apache/openejb/maven/plugin/test/StripVersionTest.java
index 5b6dec0..d0e86ca 100644
--- a/maven/tomee-maven-plugin/src/test/java/org/apache/openejb/maven/plugin/test/StripVersionTest.java
+++ b/maven/tomee-maven-plugin/src/test/java/org/apache/openejb/maven/plugin/test/StripVersionTest.java
@@ -22,11 +22,10 @@ import org.junit.Rule;
 import org.junit.Test;
 
 import java.io.File;
-import java.io.FilenameFilter;
 import java.util.List;
 
+import static java.util.Arrays.asList;
 import static java.util.Collections.singletonList;
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertTrue;
 
 public class StripVersionTest {
@@ -53,26 +52,9 @@ public class StripVersionTest {
 
     @Test
     public void sironaIsInstalledAndPersisted() throws Exception {
-        assertTrue(catalinaBase.exists());
-
-        assertEquals(1, new File(catalinaBase, "javaagent").listFiles(new FilenameFilter()
{
-            @Override
-            public boolean accept(final File dir, final String name) {
-                return name.equals("sirona-javaagent-shaded.jar");
-            }
-        }).length);
-        assertEquals(1, new File(catalinaBase, "lib").listFiles(new FilenameFilter() {
-            @Override
-            public boolean accept(final File dir, final String name) {
-                return  name.equals("plexus-utils.jar");
-            }
-        }).length);
-        assertEquals(1, new File(catalinaBase, "webapps").listFiles(new FilenameFilter()
{
-            @Override
-            public boolean accept(final File dir, final String name) {
-                return name.equals("tomee-webaccess.war");
-            }
-        }).length);
-
+        for (final String file : asList("javaagent/sirona-javaagent-shaded.jar", "lib/plexus-utils.jar",
"webapps/tomee-webaccess.war")) {
+            final File fullFile = new File(catalinaBase, file);
+            assertTrue(fullFile.getAbsolutePath(), fullFile.isFile());
+        }
     }
 }


Mime
View raw message