public void _50082_WaitOnEvent_Disposed()
 {
     TestHelpers.CatchExpected(50082, "SpPeriodicWakeupOnly", "WaitOnEvent", "Attempting to use Disposed Object", () => {
         SpPeriodicWakeupOnly w = new SpPeriodicWakeupOnly();
         w.Dispose();
         Thread.Sleep(100);
         w.WaitOnEvent();
     });
 }
        public void _50084_OnPeriodicTimer_Busy()
        {
            TestHelpers.CatchUnexpected(() => {
                SpPeriodicWakeupOnly w = new SpPeriodicWakeupOnly();

                // setting terminate allows it to drop through the waitOnEvent
                w.EventReceived(BehaviorResponseEventType.TerminateRequest);
                w.WaitOnEvent();
                Thread.Sleep(100);

                // we then hit it with another event. Normaly the user would loop back to the wait to set it not busy
                w.EventReceived(BehaviorResponseEventType.PeriodicWakeup);

                w.Dispose();
                Thread.Sleep(100);
            });
            this.logReader.Validate(50084, "SpPeriodicWakeupOnly", "OnPeriodicTimer", "Still Busy When the Periodic Timer Woke Up");
        }