示例#1
0
        public void Stop()
        {
            var m       = new RecurringHelper(100);
            var success = m.Stop();

            Assert.IsTrue(success);
        }
示例#2
0
        public void TestDisposeTimer()
        {
            var m = new RecurringHelper(100);

            m.Start();
            m.TestDispose();
        }
示例#3
0
 public void ChangeTimingWithoutStart()
 {
     using (var tm = new RecurringHelper(100))
     {
         tm.ChangeTiming(TimeSpan.FromSeconds(100));
     }
 }
示例#4
0
 public void ChangeTimingZero()
 {
     using (var tm = new RecurringHelper(100))
     {
         Assert.That(() => tm.ChangeTiming(TimeSpan.Zero), Throws.TypeOf <ArgumentException>());
     }
 }
示例#5
0
        public void RunThrows()
        {
            var m = new RecurringHelper(100)
            {
                Throw = true,
            };

            m.Run(new object());
        }
示例#6
0
        public void RunStateNull()
        {
            var m = new RecurringHelper(100);

            m.Run(null);
        }
示例#7
0
        public void Run()
        {
            var m = new RecurringHelper(100);

            m.Run();
        }
示例#8
0
 public void Dispose()
 {
     using (var m = new RecurringHelper(100))
     {
     }
 }