Example #1
0
        public void TestCreateGenericTimeSource()
        {
            ITimeSource timeSource = Scheduler.CreateTimeSource(false);

            try {
                Assert.That(timeSource is GenericTimeSource);
            } finally {
                IDisposable disposableTimeSource = timeSource as IDisposable;
                if (disposableTimeSource != null)
                {
                    disposableTimeSource.Dispose();
                }
            }
        }
Example #2
0
        public void TestCreateWindowsTimeSource()
        {
            ITimeSource timeSource = Scheduler.CreateTimeSource(true);

            try {
                Assert.That(timeSource is WindowsTimeSource);
            } finally {
                IDisposable disposableTimeSource = timeSource as IDisposable;
                if (disposableTimeSource != null)
                {
                    disposableTimeSource.Dispose();
                }
            }
        }