Esempio n. 1
0
        public void TestSetProperty()
        {
            var dummy = new PropertyDummy (){ Name = "someone" };

            var command = Command.CreateSetProperty (dummy, "anyone", "Name");
            command.Execute ();
            Assert.AreEqual (dummy.Name, "anyone");

            command.Undo ();
            Assert.AreEqual (dummy.Name, "someone");
        }
Esempio n. 2
0
        public void TestSetProperty()
        {
            var dummy = new PropertyDummy()
            {
                Name = "someone"
            };

            var command = Command.CreateSetProperty(dummy, "anyone", "Name");

            command.Execute();
            Assert.AreEqual(dummy.Name, "anyone");

            command.Undo();
            Assert.AreEqual(dummy.Name, "someone");
        }