Skip to content

Commit

Permalink
Migrate to JUnit 5 and Kotlintest
Browse files Browse the repository at this point in the history
  • Loading branch information
jankotek committed Sep 11, 2017
1 parent 59fd37c commit 519df44
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 10 deletions.
37 changes: 31 additions & 6 deletions pom.xml
Expand Up @@ -103,6 +103,13 @@
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.0.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.eclipse.collections</groupId>
<artifactId>eclipse-collections-testutils</artifactId>
Expand All @@ -118,12 +125,11 @@
</dependency>

<dependency>
<groupId>org.jetbrains.kotlin</groupId>
<artifactId>kotlin-test</artifactId>
<version>${kotlin.version}</version>
<groupId>io.kotlintest</groupId>
<artifactId>kotlintest</artifactId>
<version>2.0.5</version>
<scope>test</scope>
</dependency>

</dependencies>

<build>
Expand Down Expand Up @@ -258,7 +264,26 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.19</version>
<version>2.19.1</version>

<dependencies>
<dependency>
<groupId>org.junit.platform</groupId>
<artifactId>junit-platform-surefire-provider</artifactId>
<version>1.0.0</version>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.0.0</version>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>4.12.0</version>
</dependency>
</dependencies>

<configuration>
<properties>
<property>
Expand All @@ -274,7 +299,7 @@
<argLine>${testArgLine}</argLine>

<includes>
<include>**/*</include>
<include>**/**</include>
</includes>
<excludes>
<!-- must be here, otherwise inner classes are ignored-->
Expand Down
8 changes: 4 additions & 4 deletions src/test/java/org/mapdb/tree/BTreeMap_PumpTest.kt
@@ -1,5 +1,6 @@
package org.mapdb.tree

import io.kotlintest.matchers.fail
import org.junit.Test
import org.junit.runner.RunWith
import org.junit.runners.Parameterized
Expand All @@ -8,7 +9,6 @@ import org.mapdb.serializer.GroupSerializer
import org.mapdb.store.StoreTrivial
import java.io.IOException
import java.util.*
import kotlin.test.fail


@RunWith(Parameterized::class)
Expand Down Expand Up @@ -52,7 +52,7 @@ class BTreeMap_PumpTest(
// map should use Comparator for comparations, not this serializers
object : GroupSerializer<Int> by Serializer.INTEGER {
override fun valueArrayBinaryGet(input: DataInput2?, keysLen: Int, pos: Int): Int {
fail()
fail("should not be used")
}

//TODO this needs more testing
Expand All @@ -61,11 +61,11 @@ class BTreeMap_PumpTest(
// }

override fun compare(first: Int?, second: Int?): Int {
fail()
fail("should not be used")
}

override fun valueArraySearch(keys: Any?, key: Int?): Int {
fail()
fail("should not be used")
}

// override fun valueArraySearch(keys: Any?, key: Int?, comparator: Comparator<*>?): Int {
Expand Down

0 comments on commit 519df44

Please sign in to comment.