Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 3
0
 public void MirandaInitializeFailure()
 {
     Miranda.Init(new BadContext());
 }
Exemplo n.º 4
0
 public void SetUp()
 {
     context = Miranda.Init(new MasterContext());
 }