Skip to content

Commit bf2a978

Browse files
committed
feat(test): Add ant junit5 runner libraries (#1523)
Refs: #1523
1 parent 8564037 commit bf2a978

File tree

63 files changed

+147
-135
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+147
-135
lines changed

framework/build.xml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -420,13 +420,15 @@
420420
</target>
421421

422422
<target name="unittest" depends="compile-unittest">
423-
<junitlauncher failureproperty="junit.failure">
423+
<junitlauncher haltonfailure="false" failureproperty="junit.failure" printSummary="true">
424424
<classpath refid="classpath.test" />
425425
<testclasses>
426426
<fileset dir="test-classes" includes="**/*Test.class" />
427-
<!-- <listener type="legacy-brief" sendSysOut="true" />-->
428-
<listener type="legacy-xml" sendSysErr="true" sendSysOut="true"/>
429427
</testclasses>
428+
<classpath>
429+
<pathelement location="test-classes"/>
430+
<path refid="classpath.test"/>
431+
</classpath>
430432
</junitlauncher>
431433
<fail if="junit.failure" message="Unit test(s) failed. See reports!"/>
432434
</target>

framework/dependencies.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ require: &allDependencies
4444
- org.junit.platform -> junit-platform-launcher 1.13.4
4545
- org.junit.platform -> junit-platform-engine 1.13.4
4646
- org.junit.platform -> junit-platform-commons 1.13.4
47+
- org.opentest4j -> opentest4j 1.3.0
4748
- org.apiguardian -> apiguardian-api 1.1.2
4849
- jregex 1.2_01
4950
- org.apache.logging.log4j -> log4j-api 2.23.1
94 KB
Binary file not shown.
694 KB
Binary file not shown.
9.21 KB
Binary file not shown.

framework/lib/opentest4j-1.3.0.jar

14 KB
Binary file not shown.

framework/src/play/test/FunctionalTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ public static void assertContentMatch(String pattern, Response response) {
554554
public static void assertCharset(String charset, Response response) {
555555
int pos = response.contentType.indexOf("charset=") + 8;
556556
String responseCharset = (pos > 7) ? response.contentType.substring(pos).toLowerCase() : "";
557-
assertEquals("Response charset", charset.toLowerCase(), responseCharset);
557+
assertEquals(charset.toLowerCase(), responseCharset, "Response charset");
558558
}
559559

560560
/**

framework/test-src/play/libs/FilesTest.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ public void testSanitizeFileName() throws Exception {
2727
String actual = Files.sanitizeFileName(FILE_NAMES[i]);
2828
String expected = FILE_NAMES[i + 1];
2929

30-
assertEquals("String was not sanitized properly", expected, actual);
30+
assertEquals(expected, actual, "String was not sanitized properly");
3131
}
3232
}
3333

@@ -39,7 +39,7 @@ public void testFileEqualsOnWindows() {
3939

4040
a = new File("C:\\temp\\TEST.TXT");
4141
b = new File("C:\\temp\\TEST.TXT");
42-
assertTrue( Files.isSameFile(a, b), String.format("Error comparing %s and %s", a.getPath(), b.getPath()));
42+
assertTrue(Files.isSameFile(a, b), String.format("Error comparing %s and %s", a.getPath(), b.getPath()));
4343

4444
a = new File("C:\\temp\\TEST.TXT");
4545
b = new File("C:\\temp\\TEST.TXT");

framework/test-src/play/mvc/ActionInvokerTest.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package play.mvc;
22

33
import org.junit.jupiter.api.AfterEach;
4+
import org.junit.jupiter.api.BeforeEach;
45
import org.junit.jupiter.api.Test;
56
import play.Play;
67
import play.PlayBuilder;
@@ -24,7 +25,7 @@
2425
public class ActionInvokerTest {
2526
private Object[] noArgs = new Object[0];
2627

27-
@Before
28+
@BeforeEach
2829
public void setUp() throws Exception {
2930
new PlayBuilder().build();
3031
Http.Request.current.set(new Http.Request());

resources/application-skel/test/ApplicationTest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import org.junit.*;
1+
import org.junit.jupiter.api.*;
22
import play.test.*;
33
import play.mvc.*;
44
import play.mvc.Http.*;

0 commit comments

Comments
 (0)