public void Parentship() { AprPool p = AprPool.Create(); Assert.IsFalse(p.IsNull, "#I01"); AprPool sp = AprPool.Create(p); Assert.IsFalse(sp.IsNull, "#I02"); Assert.AreEqual(((IntPtr)p).ToInt32(), ((IntPtr)(sp.Parent)).ToInt32(), "#I03"); AprPool ssp = AprPool.Create(sp); Assert.IsFalse(ssp.IsNull, "#I05"); Assert.AreEqual(((IntPtr)sp).ToInt32(), ((IntPtr)(ssp.Parent)).ToInt32(), "#I06"); Assert.IsTrue(p.IsAncestor(sp), "#I08"); Assert.IsTrue(sp.IsAncestor(ssp), "#I09"); Assert.IsTrue(p.IsAncestor(ssp), "#I10"); Assert.IsFalse(sp.IsAncestor(p), "#I11"); Assert.IsFalse(ssp.IsAncestor(p), "#I12"); Assert.IsFalse(ssp.IsAncestor(sp), "#I13"); p.Destroy(); Assert.IsTrue(p.IsNull, "#I14"); }