Package akka.actor

Source Code of akka.actor.InboxJavaAPITest

/**
* Copyright (C) 2009-2014 Typesafe Inc. <http://www.typesafe.com>
*/

package akka.actor;

import java.util.concurrent.TimeUnit;
import java.util.concurrent.TimeoutException;
import org.junit.ClassRule;
import org.junit.Test;
import akka.testkit.AkkaJUnitActorSystemResource;
import akka.testkit.AkkaSpec;
import scala.concurrent.duration.FiniteDuration;

public class InboxJavaAPITest {

  @ClassRule
  public static AkkaJUnitActorSystemResource actorSystemResource = new AkkaJUnitActorSystemResource("InboxJavaAPITest",
      AkkaSpec.testConf());

  private final ActorSystem system = actorSystemResource.getSystem();

  @Test(expected = TimeoutException.class)
  public void mustBeAbleToThrowTimeoutException() throws TimeoutException {
    Inbox inbox = Inbox.create(system);
    inbox.receive(new FiniteDuration(10, TimeUnit.MILLISECONDS));
  }

}
TOP

Related Classes of akka.actor.InboxJavaAPITest

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.