I am using TestKit to test some of my classes for a Scala project I am working on involving Akka Actors, and I'm running into this issue:
One or more requested classes are not Suites: poc.PocConstituentsWatcher
The class in question looks like this:
class PocConstituentsWatcher(_system: ActorSystem) extends TestKit(_system) with ImplicitSender with WordSpecLike with Matchers with BeforeAndAfter with BeforeAndAfterAll {
I didn't used to have this issue, because I had
def this() = this(ActorSystem)
but now I define my own ActorSystem via injection, so I have val actorSystem = injector.instance[ActorSystem]
instead, and when I do
def this() = this(actorSystem)
I get an error saying it can't find actorSystem. I think it's because the constructor signature is incorrect? Thanks for your help.
Aucun commentaire:
Enregistrer un commentaire