public void TestRunWithProcessedEvent()
 {
     var env = new Environment();
       var timeout = new Timeout(env, env.ToTimeSpan(1), "spam");
       var val = env.Run(timeout);
       Assert.AreEqual(1, env.NowD);
       Assert.AreEqual("spam", val);
       val = env.Run(timeout);
       Assert.AreEqual(1, env.NowD);
       Assert.AreEqual("spam", val);
 }
Ejemplo n.º 2
0
 private IEnumerable<Event> TestAllOfGeneratorProcess(Environment env)
 {
     var events = Enumerable.Range(0, 10).Select(x => new Timeout(env, env.ToTimeSpan(x), x));
       var allOf = new AllOf(env, events);
       yield return allOf;
       Assert.IsTrue(Enumerable.Range(0, 10).SequenceEqual(allOf.Value.Values.OfType<int>()));
       Assert.AreEqual(9, env.NowD);
 }