示例#1
0
        public void LayoutGroupOnChildRemove()
        {
            tlog.Debug(tag, $"LayoutGroupOnChildRemove START");

            flagOnChildRemoveOverride = false;
            Assert.False(flagOnChildRemoveOverride, "flagOnChildRemoveOverride should be false initially");

            var testingTarget = new MyLayoutGroup();

            Assert.IsNotNull(testingTarget, "null handle");
            Assert.IsInstanceOf <LayoutGroup>(testingTarget, "Should be an instance of LayoutGroup type.");

            using (LayoutItem child = new LayoutItem())
            {
                testingTarget.OnChildRemoveTest(child);
                Assert.True(flagOnChildRemoveOverride, "LayoutGroup overridden method not invoked.");
            }

            testingTarget.Dispose();
            tlog.Debug(tag, $"LayoutGroupOnChildRemove END (OK)");
        }