public void RootListGetRuleDescriptions() { RootList list = new RootList(); RootListChild child = list.AddNew(); string[] rules = child.GetRuleDescriptions(); }
public void TestAddNew() { Csla.Test.Basic.RootList list = new Csla.Test.Basic.RootList(); Csla.Xaml.CslaDataProvider dp = new Csla.Xaml.CslaDataProvider(); dp.ObjectInstance = list; RootListChild child = dp.AddNew() as RootListChild; Assert.IsNotNull(child); }
public void SuppressListChangedEventsDoNotRaiseCollectionChanged() { bool changed = false; var obj = new RootList(); obj.ListChanged += (o, e) => { changed = true; }; var child = new RootListChild(); // object is marked as child Assert.IsTrue(obj.RaiseListChangedEvents); using (obj.SuppressListChangedEvents) { Assert.IsFalse(obj.RaiseListChangedEvents); obj.Add(child); } Assert.IsFalse(changed, "Should not raise ListChanged event"); Assert.IsTrue(obj.RaiseListChangedEvents); Assert.AreEqual(child, obj[0]); }