예제 #1
0
        public void TestDoubleOpen()
        {
            DummyClass dummyClass = new DummyClass();

            DummyClassProxy.Open(dummyClass);
            Assert.AreEqual(dummyClass, DummyClassProxy.Get());
            Assert.ThrowsException <SecurityException> (delegate { DummyClassProxy.Open(dummyClass); });
        }
예제 #2
0
        public void TestOpen()
        {
            DummyClass dummyClass = new DummyClass();

            DummyClassProxy.Open(dummyClass);
            Assert.IsTrue(DummyClassProxy.IsValid());
            Assert.AreEqual(dummyClass, DummyClassProxy.Get());
        }
예제 #3
0
        public void TestCloseAfterOpen()
        {
            DummyClass dummyClass = new DummyClass();

            DummyClassProxy.Open(dummyClass);

            DummyClassProxy.Close();
            Assert.ThrowsException <SecurityException> (delegate { DummyClassProxy.Get(); });
        }
 public void TestCloseAfterOpen()
 {
     DummyClassProxy.Close(m_Dummy);
     Assert.ThrowsException <SecurityException> (delegate { DummyClassProxy.Get(); });
 }
 public void TestOpen()
 {
     Assert.IsTrue(DummyClassProxy.IsValid());
     Assert.AreEqual(m_Dummy, DummyClassProxy.Get());
 }