Skip to content

Commit 5da6f83

Browse files
committed
Remove JUnit warnings in tests
1 parent ce26145 commit 5da6f83

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

scala/sources/src/test/scala/tests/cukes/StepDefs.scala

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import java.util.{List => JList, Map => JMap}
44

55
import io.cucumber.datatable.DataTable
66
import io.cucumber.scala.{EN, ScalaDsl}
7-
import junit.framework.Assert._
7+
import org.junit.Assert.assertEquals
88
import tests.cukes.model.{Cukes, Person, Snake}
99

1010
import scala.jdk.CollectionConverters._
@@ -25,7 +25,7 @@ class CukesStepDefinitions extends ScalaDsl with EN {
2525
calorieCount = maps.asScala.map(_.get("CALORIES")).map(_.toDouble).fold(0.0)(_ + _)
2626
}
2727
And("""have eaten {double} calories today""") { (calories: Double) =>
28-
assertEquals(calories, calorieCount)
28+
assertEquals(calories, calorieCount, 0.0)
2929
}
3030

3131
var intBelly: Int = 0
@@ -61,7 +61,7 @@ class CukesStepDefinitions extends ScalaDsl with EN {
6161
doubleBelly = arg0
6262
}
6363
Then("""^I should have one and a half doubles in my belly$""") { () =>
64-
assertEquals(1.5, doubleBelly)
64+
assertEquals(1.5, doubleBelly, 0.0)
6565
}
6666

6767
var floatBelly: Float = 0.0f
@@ -70,7 +70,7 @@ class CukesStepDefinitions extends ScalaDsl with EN {
7070
floatBelly = arg0
7171
}
7272
Then("""^I should have one and a half floats in my belly$""") { () =>
73-
assertEquals(1.5f, floatBelly)
73+
assertEquals(1.5f, floatBelly, 0.0)
7474
}
7575

7676
var shortBelly: Short = 0.toShort

0 commit comments

Comments
 (0)