Beispiel #1
0
        public void RenamePoolByProperty()
        {
            _pool.NameChanged += (s, e) =>
            {
                Assert.AreEqual("pool", e.OldName);
                Assert.AreEqual("ocean", e.NewName);
                Assert.AreEqual(e.NewName, _pool.Name);
            };

            Property nameProperty = _pool.LookupProperty("Name");

            Assert.NotNull(nameProperty);
            Assert.AreEqual("pool", nameProperty.ToString());

            nameProperty.Parse("ocean");

            nameProperty = _pool.LookupProperty("Name");
            Assert.NotNull(nameProperty);
            Assert.AreEqual("ocean", nameProperty.ToString());

            Assert.AreEqual(EventFlags.NameChanged, _eventsFired);
        }