Ejemplo n.º 1
0
 public void PersistentActor_should_support_user_stash_operations_within_handler_under_failures()
 {
     var pref = ActorOf(Props.Create(() => new UserStashWithinHandlerFailureCallbackActor(Name)));
     pref.Tell(new Cmd("a"));
     for (int i = 1; i <= 10; i++)
     {
         var cmd = new Cmd("b-" + i);
         pref.Tell(cmd);
     }
     pref.Tell(new Cmd("c"));
     pref.Tell(GetState.Instance);
     ExpectMsgInOrder("a", "c", "b-1", "b-3", "b-4", "b-5", "b-6", "b-7", "b-8", "b-9", "b-10");
 }
 private void HandleCmd(Cmd cmd)
 {
     Persist(new[] { new Evt(cmd.Data + "-41"), new Evt(cmd.Data + "-42") }, UpdateStateHandler);
 }
 private void HandleCmd(Cmd cmd)
 {
     PersistAll(new[] { new Evt(cmd.Data + "-41"), new Evt(cmd.Data + "-42") }, UpdateStateHandler);
 }