Skip to content

Commit b6fb2d9

Browse files
committed
Added the missing test for empty public constructor when detecting Suite in discovery.
1 parent 4d7b70e commit b6fb2d9

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/main/scala/org/scalatestplus/junit5/ScalaTestEngine.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,9 @@ class ScalaTestEngine extends org.junit.platform.engine.TestEngine {
6060

6161
val isSuitePredicate =
6262
new java.util.function.Predicate[Class[_]]() {
63-
def test(t: Class[_]): Boolean = classOf[org.scalatest.Suite].isAssignableFrom(t)
63+
def test(t: Class[_]): Boolean =
64+
classOf[org.scalatest.Suite].isAssignableFrom(t) &&
65+
JUnitHelper.checkForPublicNoArgConstructor(t)
6466
}
6567

6668
def classDescriptorFunction(aClass: Class[_]) =

0 commit comments

Comments
 (0)