public void TestRequiresNew()
        {
            SincroRequiresNew ob  = new SincroRequiresNew();
            SynchRes          res = ob.CheckContextTransition(typeof(SincroRequiresNew));

            Assert.IsTrue(res == SynchRes.NewSync, "New synchronizaton context expected");

            SincroRequiresNew ob2 = new SincroRequiresNew();

            res = ob2.CheckContext(Thread.CurrentContext);
            Assert.IsTrue(res == SynchRes.NewSync, "Synchronizaton context not expected");
        }
        public void TestCallback()
        {
            Thread tr = new Thread(new ThreadStart(CallbackThread));

            tr.Start();
            Thread.Sleep(200);
            bool concurrent = notreentrant.CheckConcurrency();

            Assert.IsTrue(!concurrent, "Concurrency detected");
            notreentrant.CheckContext(Thread.CurrentContext);

            tr.Join();
            Assert.IsTrue(!otResult, "Concurrency detected in CallbackThread");
        }
		public void TestRequiresNew ()
		{
			SincroRequiresNew ob = new SincroRequiresNew ();
			SynchRes res = ob.CheckContextTransition (typeof(SincroRequiresNew));
			Assert ("New synchronizaton context expected", res == SynchRes.NewSync);

			SincroRequiresNew ob2 = new SincroRequiresNew ();
			res = ob2.CheckContext (Thread.CurrentContext);
			Assert ("Synchronizaton context not expected", res == SynchRes.NewSync);
		}