Skip to content

Commit 766a391

Browse files
committed
Convert junit 4 integration tests to junit 6
1 parent 25ce844 commit 766a391

File tree

86 files changed

+589
-23
lines changed

Some content is hidden

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

86 files changed

+589
-23
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"filename": "CompileErrorStudent.java",
3+
"natural_language": "en"
4+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import org.junit.jupiter.api.Assertions;
2+
import org.junit.jupiter.api.Test;
3+
4+
public class CompileErrorStudentTest {
5+
@Test
6+
public void testMethod() {
7+
Assertions.assertEquals(true, new CompileErrorStudent().method());
8+
}
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import org.junit.platform.suite.api.Suite;
2+
import org.junit.platform.suite.api.SelectClasses;
3+
4+
5+
@Suite
6+
@SelectClasses({
7+
CompileErrorStudentTest.class,
8+
})
9+
public class TestSuite {}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
public class CompileErrorStudent {
2+
public boolean method() {
3+
// Intentional typo to trigger a compilation fault in the student's
4+
// code.
5+
return tru;
6+
}
7+
}
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"filename": "CompileErrorInTests.java",
3+
"natural_language": "en"
4+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import org.junit.jupiter.api.Assertions;
2+
import org.junit.jupiter.api.Test;
3+
4+
public class CompileErrorInTestsTest {
5+
@Test
6+
public void testMethod() {
7+
// Intentional typo to trigger a compilation error in the tests.
8+
Assertions.asserEquals(true, true);
9+
}
10+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import org.junit.platform.suite.api.Suite;
2+
import org.junit.platform.suite.api.SelectClasses;
3+
4+
5+
@Suite
6+
@SelectClasses({
7+
CompileErrorInTestsTest.class,
8+
})
9+
public class TestSuite {}

integration-tests/junit6/compile-error-tests/result.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
{
2727
"command": "append-message",
2828
"message": {
29-
"description": "CompileErrorInTestsTest.java:8: error: cannot find symbol\n Assert.asserEquals(true, true);\n ^\n symbol: method asserEquals(boolean,boolean)\n location: class Assert",
29+
"description": "CompileErrorInTestsTest.java:8: error: cannot find symbol\n Assertions.asserEquals(true, true);\n ^\n symbol: method asserEquals(boolean,boolean)\n location: class Assertions",
3030
"format": "code"
3131
}
3232
}
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
public class CompileErrorInTests {
2+
public boolean method() {
3+
return true;
4+
}
5+
}
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../with-package/config.json

0 commit comments

Comments
 (0)