Exemplo n.º 1
0
        public void Run()
        {
            Testing.Testbed tb = new Testing.Testbed();
              Assert.True(tb.Runtime.RequestStart(new FilterList() { new MyFilter2() }, tb.Bundle));

              tb.Runtime.Run();
              Assert.AreEqual(14.0, tb.Bundle.Get<double>("result"));
              Assert.True(tb.Runtime.StopRequested);
              Assert.False(tb.Runtime.Running);
        }
Exemplo n.º 2
0
        public void SingleStep()
        {
            Testing.Testbed tb = new Testing.Testbed();
              Assert.True(tb.Runtime.RequestStart(new FilterList() { new MyFilter() }, tb.Bundle));
              Assert.False(tb.Runtime.RequestStart(new FilterList() { new MyFilter() }, tb.Bundle));

              tb.Runtime.SingleStep();
              Assert.AreEqual(14.0, tb.Bundle.Get<double>("result"));
              Assert.False(tb.Runtime.StopRequested);
              Assert.True(tb.Runtime.RequestStop());
              Assert.True(tb.Runtime.StopRequested);
              Assert.Throws<InvalidOperationException>(new TestDelegate(() => tb.Runtime.SingleStep()));
        }