public void PropertyBag_IsDefinedTest() { var person = new SimplePerson(); var bag = person.GetPropertyBag(); Assert.IsFalse(bag.IsDefined("FirstName")); Assert.IsFalse(bag.IsDefined("FullName")); Assert.IsFalse(bag.IsDefined("Frank")); person.FirstName = "Tom"; Assert.IsTrue(bag.IsDefined("FirstName")); Assert.IsFalse(bag.IsDefined("FullName")); Assert.IsFalse(bag.IsDefined("Frank")); }
public void PropertyBag_FixCasingTest() { var person = new SimplePerson(); var bag = person.GetPropertyBag(); person.FirstName = "Frank"; person.FirstName = "Frank"; bag.Set("Tom", PropertySetModes.FixCasing, "firstname"); Assert.AreEqual("Tom", person.FirstName); }