public void InvalidAdd1() { MyContainer co = new MyContainer(); var c1 = new Label("hi1"); co.InternalAdd(c1); }
public void InvalidAdd2 () { MyContainer co = new MyContainer (); var c1 = new Label ("hi1"); HBox b = new HBox (); b.PackStart (c1); co.InternalAdd (c1); }
public void InvalidAdd2() { MyContainer co = new MyContainer(); var c1 = new Label("hi1"); HBox b = new HBox(); b.PackStart(c1); co.InternalAdd(c1); }
public void InternalRemoveAdd() { // The a child can be removed from internal containers and still // be a child of the container MyContainer co = new MyContainer(); Assert.AreEqual(0, co.Surface.Children.Count()); var c1 = new Label("hi1"); co.Add(c1); Assert.AreEqual(1, co.Surface.Children.Count()); co.InternalRemove(c1); Assert.AreEqual(1, co.Surface.Children.Count()); Assert.AreSame(co, c1.Parent); co.InternalAdd(c1); Assert.AreEqual(1, co.Surface.Children.Count()); Assert.AreSame(co, c1.Parent); }
public void InvalidAdd1 () { MyContainer co = new MyContainer (); var c1 = new Label ("hi1"); co.InternalAdd (c1); }
public void InternalRemoveAdd () { // The a child can be removed from internal containers and still // be a child of the container MyContainer co = new MyContainer (); Assert.AreEqual (0, co.Surface.Children.Count ()); var c1 = new Label ("hi1"); co.Add (c1); Assert.AreEqual (1, co.Surface.Children.Count ()); co.InternalRemove (c1); Assert.AreEqual (1, co.Surface.Children.Count ()); Assert.AreSame (co, c1.Parent); co.InternalAdd (c1); Assert.AreEqual (1, co.Surface.Children.Count ()); Assert.AreSame (co, c1.Parent); }