File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed
src/test/groovy/org/junit/jupiter/api Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ plugins {
2+ groovy
3+ }
4+
15apply (from = " $rootDir /gradle/testing.gradle.kts" )
26
37description = " JUnit Jupiter Engine"
@@ -31,6 +35,7 @@ dependencies {
3135 testImplementation(project(" :junit-platform-runner" ))
3236 testImplementation(project(" :junit-platform-testkit" ))
3337 testImplementation(" org.jetbrains.kotlin:kotlin-stdlib" )
38+ testImplementation(localGroovy())
3439 testImplementation(" com.google.jimfs:jimfs:${Versions .jimfs} " ) {
3540 because(" used to test TempDirectory extension" )
3641 }
Original file line number Diff line number Diff line change 1+ package org.junit.jupiter.api
2+
3+ import groovy.transform.CompileStatic
4+
5+ import static org.junit.jupiter.api.Assertions.assertEquals
6+ import static org.junit.jupiter.api.Assertions.assertNotEquals
7+
8+ @CompileStatic
9+ class GroovyAssertionsTests {
10+
11+ @Test
12+ void " integers can be passed to assertEquals" () {
13+ assertEquals (42 , 42 )
14+ assertEquals (42 , Integer . valueOf(42 ))
15+ assertEquals (Integer . valueOf(42 ), 42 )
16+ // TODO add overload for assertEquals(Integer, Integer)
17+ // assertEquals(Integer.valueOf(42), Integer.valueOf(42))
18+ }
19+
20+ @Test
21+ void " integers can be passed to assertNotEquals" () {
22+ assertNotEquals(23 , 42 )
23+ assertNotEquals(23 , Integer . valueOf(42 ))
24+ assertNotEquals(Integer . valueOf(23 ), 42 )
25+ // TODO add overload for assertNotEquals(Integer, Integer)
26+ // assertNotEquals(Integer.valueOf(23), Integer.valueOf(42))
27+ }
28+
29+ }
You can’t perform that action at this time.
0 commit comments