public void AddToField() { @class clz = new @class(); ISchemaEditorNode child = fieldReference.AddValue(clz); CollectionAssert.Contains(parent.ActiveNodes,child); CollectionAssert.Contains(hm.Items, clz); Assert.AreSame(clz,child.Value); Assert.AreEqual("class",child.Name); }
public void AccessingArrayAfterRemovingFromIt() { @class clz1 = new @class(), clz2 = new @class(), clz3 = new @class(); ISchemaEditorNode child1 = fieldReference.AddValue(clz1), child2 = fieldReference.AddValue(clz2), child3 = fieldReference.AddValue(clz3); fieldReference.RemoveValue(child2); Assert.AreEqual(2,fieldReference.AmountExisting); Assert.AreEqual(clz1,hm.Items[0]); Assert.AreEqual(clz3,hm.Items[1]); }
public void RemoveFromField() { @class clz = new @class(); ISchemaEditorNode child = fieldReference.AddValue(clz); fieldReference.RemoveValue(child); CollectionAssert.DoesNotContain(parent.ActiveNodes,child); CollectionAssert.DoesNotContain(hm.Items, clz); }