public AwaitCond(Duration max, Duration interval) { p.awaitCond(new AbstractFunction0<Object>() { public Object apply() { return cond(); } }, max, interval, p.awaitCond$default$4()); }
/** * Receive one message from the test actor and assert that it conforms to the * given class. Wait time is bounded by the given duration, with an * AssertionFailure being thrown in case of timeout. * * @return the received object */ public <T> T expectMsgClass(FiniteDuration max, Class<T> clazz) { return p.expectMsgClass(max, clazz); }
/** * Have the testActor watch someone (i.e. * <code>getContext().getWatch(...)</code> ). */ public ActorRef watch(ActorRef ref) { return p.watch(ref); }
public ActorRef getLastSender() { return p.lastMessage().sender(); }
/** * Receive one message from the test actor and assert that it equals the given * object. Wait time is bounded by the given duration, with an * AssertionFailure being thrown in case of timeout. * * @return the received object */ public <T> T expectMsgEquals(FiniteDuration max, T msg) { return p.expectMsg(max, msg); }
/** * Have the testActor stop watching someone (i.e. * <code>getContext.unwatch(...)</code>). */ public ActorRef unwatch(ActorRef ref) { return p.unwatch(ref); }
/** * Assert that no message is received for the specified time. */ public void expectNoMsg(FiniteDuration max) { p.expectNoMsg(max); }
public IgnoreMsg() { p.ignoreMsg( new JavaPartialFunction<Object, Object>() { public Boolean apply(Object in, boolean isCheck) { return ignore(in); } }); } }
/** * Obtain time remaining for execution of the innermost enclosing <code>Within</code> block or * missing that it returns the properly dilated default for this case from settings (key * "akka.test.single-expect-default"). */ public FiniteDuration remaining() { return p.remaining(); }
public Within(FiniteDuration max) { p.within( max, new AbstractFunction0<Object>() { @Override public Object apply() { run(); return null; } }); }
public AwaitCond(Duration max, Duration interval, String message) { p.awaitCond(new AbstractFunction0<Object>() { public Object apply() { return cond(); } }, max, interval, message); } }
@Override public Object apply() { run(); return null; } });
@Override public Object apply() { return cond(); } },
@AfterClass public static void teardown() { JavaTestKit.shutdownActorSystem(system); }
/** * Spawns an actor as a child of this test actor, and returns the child's ActorRef. The actor will * have an auto-generated name and will be supervised using {@link * SupervisorStrategy.stoppingStrategy}. * * @param props Props to create the child actor */ public ActorRef childActorOf(Props props) { return p.childActorOf(props); } }
public ActorRef getLastSender() { return p.lastMessage().sender(); }
public IgnoreMsg() { p.ignoreMsg(new JavaPartialFunction<Object, Object>() { public Boolean apply(Object in, boolean isCheck) { return ignore(in); } }); } }
/** * Obtain time remaining for execution of the innermost enclosing <code>Within</code> block or * missing that it returns the properly dilated default for this case from settings (key * "akka.test.single-expect-default"). */ public FiniteDuration remaining() { return p.remaining(); }
/** * Spawns an actor as a child of this test actor, and returns the child's ActorRef. The actor will * be supervised using {@link SupervisorStrategy.stoppingStrategy}. * * @param props Props to create the child actor * @param name Actor name for the child actor */ public ActorRef childActorOf(Props props, String name) { return p.childActorOf(props, name); }
public ActorRef getLastSender() { return p.lastMessage().sender(); }