示例#1
0
        public void MirandaObjectBindingTest()
        {
            context = Miranda.Init(new ObjectContext());
            TestObject testObject = context.Get <TestObject>();

            Assert.AreEqual("A changed name", testObject.Name);
            testObject.Name = "Changed again";
            TestObject newTestObject = context.Get <TestObject>();

            Assert.AreEqual("Changed again", newTestObject.Name);
        }
示例#2
0
        public void MirandaSingletonBindingTest()
        {
            context = Miranda.Init(new MasterContext(), new SingletonContext());
            SingletonClass singletonClass = context.Get <SingletonClass>();

            Assert.AreEqual(STRING_BINDING, singletonClass.value);
            singletonClass.value = "New Value";
            SingletonClass newSingleton = context.Get <SingletonClass>();

            Assert.AreEqual("New Value", newSingleton.value);
        }
示例#3
0
 public void MirandaInitializeFailure()
 {
     Miranda.Init(new BadContext());
 }
示例#4
0
 public void SetUp()
 {
     context = Miranda.Init(new MasterContext());
 }