public void ReceiveWaitTimeOut2Test() { TestLauncherActor.Test(() => { var actor = new ReceiveActor <int, string>(); var target = new TargetActor(); var resultEven = actor.WaitAsync((IActor)target, 2, 2000); Assert.IsTrue(resultEven.Result.Item2 == "even"); }); }
public void ReceiveWait4Test() { TestLauncherActor.Test(() => { var actor = new ReceiveActor <int>(); var target = new TargetActor2(); var resultEven = actor.WaitAsync(target, 2); Assert.IsTrue(resultEven.Result.Item2 == 4); }); }
public void ReceiveWaitTimeOut1Test() { TestLauncherActor.Test(() => { var actor = new ReceiveActor <int, string>(); var target = new TargetActor(); var resultOdd = actor.WaitAsync(target, 1, 10000); Assert.IsTrue(resultOdd.Result.Item2 == "odd"); }); }
public int WaitForResult() { var res = _wait.WaitAsync(this, "Start").Result; return(fSum); }