private static void UpdateObjectWithValue(TreeGridNode rootNode, params Change[] changes) { foreach (Change change in changes) { TreeGridNode found = FindObjectInTree(rootNode, change.OldValue); Assert.IsNotNull(found); RenderHierarchy.TryUpdateValueType(found, change.NewValue); } }
public void TestSimpleCollectionsAreExcluded() { RunInSTAThread( delegate { Db.Store(new ComplexItem <int>(1, 2, 3)); Reopen(); object obj = RetrieveOnlyObject(typeof(ComplexItem <int>)); TreeGridNode rootNode = RootNodeFor(obj); Assert.IsFalse(RenderHierarchy.TryUpdateValueType(SubItemValueFieldForIntCollection(rootNode, 2), 10)); }); }
public void TestChildCollectionsAreExcluded() { RunInSTAThread( delegate { Db.Store(new Test(1, NewHashTable(1, 2, 3, 4, 5))); Reopen(); object obj = RetrieveOnlyObject(typeof(Test)); Db.Ext().Activate(obj, 10); TreeGridNode rootNode = RootNodeFor(obj); Assert.IsFalse(RenderHierarchy.TryUpdateValueType(FindTreeNodeWithInt(rootNode, 5), 10)); }); }