Example #1
0
        public void WillRemoveTimer()
        {
            TimerCommands.CreateTimer("shmoo3");
            TimerCommands.RemoveTimer("shmoo3");

            Assert.IsFalse(TimerCommands.TimerExists("shmoo3"));
        }
Example #2
0
        public void WillCreateTimer()
        {
            TimerCommands.CreateTimer("shmoo2");

            Assert.IsTrue(TimerCommands.TimerExists("shmoo2"));

            TimerCommands.RemoveTimer("shmoo2");
        }
Example #3
0
        public void WillAddOffset()
        {
            TimerCommands.CreateTimer("shmoo");
            TimerCommands.SetTimer("shmoo", (int)TimeSpan.FromMinutes(2).TotalMilliseconds);

            long timerValue = TimerCommands.Timer("shmoo");

            TimeSpan timespan = TimeSpan.FromMilliseconds(timerValue);

            Assert.AreEqual(2, (int)timespan.TotalMinutes);

            TimerCommands.RemoveTimer("shmoo");
        }
Example #4
0
 public void WillCreateTimerSetTimer()
 {
     TimerCommands.SetTimer("shmoo4");
     Assert.IsTrue(TimerCommands.TimerExists("shmoo4"));
 }