Skip to content

Commit b91adec

Browse files
committed
Set explicit unit return type in junit test
1 parent 4788dd8 commit b91adec

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scala-test-junit4/src/test/scala/com/baeldung/scala/junit4/STAssertionsTests.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class STAssertionsTests extends AssertionsForJUnit {
88
private final val myInt = 1
99

1010
@Test
11-
def testAssertJUnitStyle() = {
11+
def testAssertJUnitStyle(): Unit = {
1212
assertEquals(myInt, 1)
1313
assertTrue(myInt > 0)
1414

@@ -21,7 +21,7 @@ class STAssertionsTests extends AssertionsForJUnit {
2121
}
2222

2323
@Test
24-
def testAssertScalaTestStyle() = {
24+
def testAssertScalaTestStyle(): Unit = {
2525
assert(myInt == 1)
2626
assert(myInt.isValidInt)
2727
intercept[ArithmeticException] {

0 commit comments

Comments
 (0)