Merge branch 'master' into wip-traversal-oriented-layout-master-patriknw
This commit is contained in:
commit
3554ad7243
25 changed files with 313 additions and 64 deletions
|
|
@ -4,6 +4,7 @@
|
|||
package docs.remoting;
|
||||
|
||||
import akka.testkit.AkkaJUnitActorSystemResource;
|
||||
import docs.AbstractJavaTest;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
@ -21,7 +22,7 @@ import akka.remote.RemoteScope;
|
|||
|
||||
import akka.actor.AbstractActor;
|
||||
|
||||
public class RemoteDeploymentDocTest {
|
||||
public class RemoteDeploymentDocTest extends AbstractJavaTest {
|
||||
|
||||
public static class SampleActor extends AbstractActor {
|
||||
@Override
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ public class SerializationDocTest {
|
|||
|
||||
// Pick a unique identifier for your Serializer,
|
||||
// you've got a couple of billions to choose from,
|
||||
// 0 - 16 is reserved by Akka itself
|
||||
// 0 - 40 is reserved by Akka itself
|
||||
@Override public int identifier() {
|
||||
return 1234567;
|
||||
}
|
||||
|
|
@ -80,7 +80,7 @@ public class SerializationDocTest {
|
|||
|
||||
// Pick a unique identifier for your Serializer,
|
||||
// you've got a couple of billions to choose from,
|
||||
// 0 - 16 is reserved by Akka itself
|
||||
// 0 - 40 is reserved by Akka itself
|
||||
@Override public int identifier() {
|
||||
return 1234567;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ import java.util.concurrent.CompletionStage;
|
|||
import java.util.concurrent.ExecutionException;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import docs.AbstractJavaTest;
|
||||
import scala.concurrent.duration.Duration;
|
||||
//#other-imports
|
||||
|
||||
|
|
@ -29,7 +30,7 @@ import org.junit.*;
|
|||
* This class is not meant to be run as a test in the test suite, but it
|
||||
* is set up such that it can be run interactively from within an IDE.
|
||||
*/
|
||||
public class QuickStartDocTest {
|
||||
public class QuickStartDocTest extends AbstractJavaTest {
|
||||
|
||||
static
|
||||
//#create-materializer
|
||||
|
|
|
|||
|
|
@ -14,10 +14,11 @@ import akka.testkit.TestProbe;
|
|||
|
||||
import com.typesafe.config.ConfigFactory;
|
||||
|
||||
import docs.AbstractJavaTest;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
public class ParentChildTest {
|
||||
public class ParentChildTest extends AbstractJavaTest {
|
||||
@ClassRule
|
||||
public static AkkaJUnitActorSystemResource actorSystemResource =
|
||||
new AkkaJUnitActorSystemResource("TestKitDocTest",
|
||||
|
|
|
|||
|
|
@ -6,6 +6,8 @@ package docs.testkit;
|
|||
import static org.junit.Assert.*;
|
||||
|
||||
import akka.testkit.*;
|
||||
import docs.AbstractJavaTest;
|
||||
import org.junit.Assert;
|
||||
import org.junit.ClassRule;
|
||||
import org.junit.Test;
|
||||
|
||||
|
|
@ -24,7 +26,7 @@ import scala.concurrent.Future;
|
|||
import akka.testkit.TestActor.AutoPilot;
|
||||
import scala.concurrent.duration.Duration;
|
||||
|
||||
public class TestKitDocTest {
|
||||
public class TestKitDocTest extends AbstractJavaTest {
|
||||
|
||||
@ClassRule
|
||||
public static AkkaJUnitActorSystemResource actorSystemResource =
|
||||
|
|
@ -76,7 +78,7 @@ public class TestKitDocTest {
|
|||
final TestActorRef<MyActor> ref = TestActorRef.create(system, props, "myActor");
|
||||
try {
|
||||
ref.receive(new Exception("expected"));
|
||||
fail("expected an exception to be thrown");
|
||||
Assert.fail("expected an exception to be thrown");
|
||||
} catch (Exception e) {
|
||||
assertEquals("expected", e.getMessage());
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
package docs.testkit;
|
||||
|
||||
//#fullsample
|
||||
import docs.AbstractJavaTest;
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Assert;
|
||||
import org.junit.BeforeClass;
|
||||
|
|
@ -16,7 +17,7 @@ import akka.actor.AbstractActor;
|
|||
import akka.testkit.JavaTestKit;
|
||||
import scala.concurrent.duration.Duration;
|
||||
|
||||
public class TestKitSampleTest {
|
||||
public class TestKitSampleTest extends AbstractJavaTest {
|
||||
|
||||
public static class SomeActor extends AbstractActor {
|
||||
ActorRef target = null;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue