Esempio n. 1
0
        public void BeforeRecurringTimeFrequencyTest()
        {
            TimeSpan sTime = new TimeSpan(10, 0, 0);
            TimeSpan eTime = new TimeSpan(22, 0, 0);

            TimeFrequencyBase frequency = new RecurringTimeFrequency(10, IntervalUnit.Second, sTime, eTime);

            Console.WriteLine(frequency.Description);

            TimeSpan  lastExecuteTime = new TimeSpan(9, 59, 59);
            TimeScope scope           = frequency.GetTimeScope(lastExecuteTime, _TimeOffset);

            Assert.IsNull(scope);
        }
		public void InRecurringTimeFrequencyTest()
		{
			TimeSpan sTime = new TimeSpan(10, 0, 0);
			TimeSpan eTime = new TimeSpan(22, 0, 0);

			TimeFrequencyBase frequency = new RecurringTimeFrequency(10, IntervalUnit.Second, sTime, eTime);
			Console.WriteLine(frequency.Description);

			TimeSpan lastExecuteTime = new TimeSpan(10, 11, 11);
			TimeScope scope = frequency.GetTimeScope(lastExecuteTime, _TimeOffset);

			Assert.IsNotNull(scope);
			Console.WriteLine(scope.BeginTime);
			Console.WriteLine(scope.EndTime);

			Assert.AreEqual(new TimeSpan(10, 11, 10), scope.BeginTime);
			Assert.AreEqual(new TimeSpan(10, 11, 20), scope.EndTime);
		}
Esempio n. 3
0
        public void InRecurringTimeFrequencyTest()
        {
            TimeSpan sTime = new TimeSpan(10, 0, 0);
            TimeSpan eTime = new TimeSpan(22, 0, 0);

            TimeFrequencyBase frequency = new RecurringTimeFrequency(10, IntervalUnit.Second, sTime, eTime);

            Console.WriteLine(frequency.Description);

            TimeSpan  lastExecuteTime = new TimeSpan(10, 11, 11);
            TimeScope scope           = frequency.GetTimeScope(lastExecuteTime, _TimeOffset);

            Assert.IsNotNull(scope);
            Console.WriteLine(scope.BeginTime);
            Console.WriteLine(scope.EndTime);

            Assert.AreEqual(new TimeSpan(10, 11, 10), scope.BeginTime);
            Assert.AreEqual(new TimeSpan(10, 11, 20), scope.EndTime);
        }
		public void BeforeRecurringTimeFrequencyTest()
		{
			TimeSpan sTime = new TimeSpan(10, 0, 0);
			TimeSpan eTime = new TimeSpan(22, 0, 0);

			TimeFrequencyBase frequency = new RecurringTimeFrequency(10, IntervalUnit.Second, sTime, eTime);
			Console.WriteLine(frequency.Description);

			TimeSpan lastExecuteTime = new TimeSpan(9, 59, 59);
			TimeScope scope = frequency.GetTimeScope(lastExecuteTime, _TimeOffset);

			Assert.IsNull(scope);
		}