diff --git a/pom.xml b/pom.xml index 46a71d6..3fa4221 100644 --- a/pom.xml +++ b/pom.xml @@ -12,7 +12,7 @@ UTF-8 - 1.7 + 21 ${encoding} ${encoding} ${java.version} @@ -23,13 +23,13 @@ junit junit - 4.11 + 4.13.2 test org.assertj assertj-core - 1.5.0 + 3.25.3 test diff --git a/src/test/jars-content/build-jars.sh b/src/test/jars-content/build-jars.sh old mode 100644 new mode 100755 diff --git a/src/test/jars-content/example-war/WEB-INF/lib/example.jar b/src/test/jars-content/example-war/WEB-INF/lib/example.jar index adeac0e..338a861 100644 Binary files a/src/test/jars-content/example-war/WEB-INF/lib/example.jar and b/src/test/jars-content/example-war/WEB-INF/lib/example.jar differ diff --git a/src/test/jars-content/example.jar b/src/test/jars-content/example.jar index adeac0e..338a861 100644 Binary files a/src/test/jars-content/example.jar and b/src/test/jars-content/example.jar differ diff --git a/src/test/jars-content/example.war b/src/test/jars-content/example.war index 2aa91b1..9472b1f 100644 Binary files a/src/test/jars-content/example.war and b/src/test/jars-content/example.war differ diff --git a/src/test/java/io/github/xhanin/jarup/WorkingCopyTest.java b/src/test/java/io/github/xhanin/jarup/WorkingCopyTest.java index 31e21ed..59a01cd 100644 --- a/src/test/java/io/github/xhanin/jarup/WorkingCopyTest.java +++ b/src/test/java/io/github/xhanin/jarup/WorkingCopyTest.java @@ -106,11 +106,12 @@ public void should_handle_jar_of_jar_for_write() throws Exception { public void should_keep_jar_of_inside_untouched() throws Exception { Path exampleJarUnderTest = getJarUnderTest("example.war"); - long jarTimestamp = 1389540958000L; - long jarLength = 1421L; + long jarTimestamp; + long jarLength; try (WorkingCopy wc = WorkingCopy.prepareFor(exampleJarUnderTest)) { - assertThat(wc.getFile("WEB-INF/lib/example.jar").lastModified()).isEqualTo(jarTimestamp); - assertThat(wc.getFile("WEB-INF/lib/example.jar").length()).isEqualTo(jarLength); + File innerJar = wc.getFile("WEB-INF/lib/example.jar"); + jarTimestamp = innerJar.lastModified(); + jarLength = innerJar.length(); wc.writeFile("test.txt", "UTF-8", "test"); }