Beispiel #1
0
 public void FutureAsyncTest()
 {
     TestLauncherActor.Test(() =>
     {
         var future = new Future <string>();
         var actor  = new FutureAsyncActorTest();
         actor.SendMessage("Test Data");
         var result = GetResult(future);
         actor.SendMessage((IActor)future);
         Assert.AreEqual("Test Data", result.Result);
     });
 }
Beispiel #2
0
 public void FutureFilteredAsyncTest()
 {
     TestLauncherActor.Test(() =>
     {
         var future = new Future <string>();
         var actor  = new FutureAsyncActorTest();
         actor.SendMessage("Test Data");
         var result = future.ResultAsync(o => (string)o == "Test Data");
         actor.SendMessage(future);
         Assert.AreEqual("Test Data", result.Result);
     });
 }