add JavaTestKit, see #1952
- it’s a completely new-written thing in pure Java, so that “protected” modifiers actually work and no ghost errors appear wrt. inheriting from PartialFunction or similar - it also features integration with the EventFilter - all closure-based constructs are modeled as inner classes of the JavaTestKit, where the user needs to override a single method which will then be executed
This commit is contained in:
parent
be74eb835b
commit
d7bed79730
15 changed files with 964 additions and 365 deletions
|
|
@ -44,10 +44,10 @@ class TestProbeSpec extends AkkaSpec with DefaultTimeout {
|
|||
//#autopilot
|
||||
val probe = TestProbe()
|
||||
probe.setAutoPilot(new TestActor.AutoPilot {
|
||||
def run(sender: ActorRef, msg: Any): Option[TestActor.AutoPilot] =
|
||||
def run(sender: ActorRef, msg: Any): TestActor.AutoPilot =
|
||||
msg match {
|
||||
case "stop" ⇒ None
|
||||
case x ⇒ testActor.tell(x, sender); Some(this)
|
||||
case "stop" ⇒ TestActor.NoAutoPilot
|
||||
case x ⇒ testActor.tell(x, sender); TestActor.KeepRunning
|
||||
}
|
||||
})
|
||||
//#autopilot
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue