Esempio n. 1
0
    /*
     * Test that Interrupt of Sleep() works.  Note: The MS doco on Sleep
     * does NOT say that it will throw a ThreadInterruptedException.  However
     * the example code for Thread.Interrupt demonstrates it can.
     */
    public void TestMonitorInterruptDuringSleep()
    {
        if (!TestThread.IsThreadingSupported)
        {
            return;
        }

        MonitorInterruptDuringSleep test = new MonitorInterruptDuringSleep();
        String result = test.testMonitorInterruptDuringSleep();

        if (result != null)
        {
            Assert(result, result == null);
        }
    }
	/*
	 * Test that Interrupt of Sleep() works.  Note: The MS doco on Sleep
	 * does NOT say that it will throw a ThreadInterruptedException.  However
	 * the example code for Thread.Interrupt demonstrates it can.
	 */
	public void TestMonitorInterruptDuringSleep()
	{
		if (!TestThread.IsThreadingSupported)
		{
			return;
		}

		MonitorInterruptDuringSleep test = new MonitorInterruptDuringSleep();
		String result = test.testMonitorInterruptDuringSleep();
		if (result != null)
	  		Assert(result, result == null);
	}