Java Code Examples for akka.testkit.JavaTestKit#expectMsgEquals()

The following examples show how to use akka.testkit.JavaTestKit#expectMsgEquals() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds"), Integer.MAX_VALUE));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}
 
Example 2
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds"), Integer.MAX_VALUE));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}
 
Example 3
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds")));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}
 
Example 4
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds"), Integer.MAX_VALUE));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}
 
Example 5
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds"), Integer.MAX_VALUE));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}
 
Example 6
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds")));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}
 
Example 7
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds")));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}
 
Example 8
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds")));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}
 
Example 9
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds"), Integer.MAX_VALUE));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}
 
Example 10
Source File: GuestTest.java    From oreilly-reactive-architecture-student with Apache License 2.0 4 votes vote down vote up
private ActorRef createGuest(JavaTestKit kit, ActorRef waiter) {
    ActorRef guest = system.actorOf(Guest.props(waiter, new Coffee.Akkaccino(), kit.duration("100 milliseconds"), Integer.MAX_VALUE));
    kit.expectMsgEquals(new Waiter.ServeCoffee(new Coffee.Akkaccino())); // Creating Guest immediately sends Waiter.ServeCoffee
    return guest;
}