What jar-file dependency do I add to resolve this import?
import jdocs.AbstractJavaTest;
It's imported in Akka's own example code (https://doc.akka.io/docs/akka/current/java/testing.html) yet after a lot of searching I can't find any mention of the actual jar dependency and the Akka documentation search function is so unhelpful that it claims there are no mentions of "jdocs.AbstractJavaTest" even when the code is on the screen in front of me.
Note that the following artifacts do not contain it:
'com.typesafe.akka:akka-actor_2.12:2.5.6'
'com.typesafe.akka:akka-testkit_2.12:2.5.3'
Thanks for any help you can give.
AbstractJavaTest
is located in the akka-docs module in the Akka repository and is not packaged in any of the published jars. All it does is extend JUnitSuite
:
/*
* Copyright (C) 2016-2017 Lightbend Inc. <http://www.lightbend.com>
*/
package jdocs
import org.scalatest.junit.JUnitSuite
/**
* Base class for all runnable example tests written in Java
*/
abstract class AbstractJavaTest extends JUnitSuite {
}
As documented in the pull request that brought in this class, it was added to (1) hide the detail that the Java test suites in the Akka documentation need to extend JUnitSuite
, and (2) to define that in one location. Feel free to manually add this class or its equivalent to your code, or simply have your test suites directly extend JUnitSuite
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With