public void TestCreateShutdownTimer() { var ni = new NotificationIcon(); var delegateFired = false; long millisToWait; var shutdownTimer = ni.CreateShutdownTime(DateTime.Now, delegate { delegateFired = true; }, out millisToWait); Assert.IsNotNull(shutdownTimer, "Timer not created"); Assert.IsTrue(millisToWait > 0 && !delegateFired, "Time to wait is less than 1 second"); }