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

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

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

            DummyClassProxy.Open(dummyClass);

            DummyClassProxy.Close();
            Assert.ThrowsException <SecurityException> (delegate { DummyClassProxy.Get(); });
        }
 public void TestDoubleOpen()
 {
     Assert.ThrowsException <SecurityException> (delegate { DummyClassProxy.Open(m_Dummy); });
 }
 public void TestInitialize()
 {
     DummyClassProxy.Open(m_Dummy);
 }