Beispiel #1
0
        public void Test_Component_Show()
        {
            MockComponent component = new MockComponent();

            component.Hide();
            component.Show();
            component.CheckAlive();
        }
Beispiel #2
0
        public void Test_Component_Hide()
        {
            MockComponent component = new MockComponent();

            component.CheckAlive();
            component.Hide();
            component.CheckHidden();
        }
Beispiel #3
0
        public void Test_Component_Die()
        {
            MockComponent component = new MockComponent();

            component.CheckAlive();
            component.Die();
            component.CheckDead();
        }
        public void TestObjectManagerLastChild()
        {
            Component component1 = new MockComponent();
            Component component2 = new MockComponent();

            ObjectManager.AddChild(component1, true, true);
            ObjectManager.AddChild(component2, true, true);

            ObjectManager.Update(0);

            Assert.AreEqual(component2, ObjectManager.LastChild <Component>());
        }
        public void TestObjectManagerChildAtIndex()
        {
            MockComponent object1 = new MockComponent();
            MockComponent object2 = new MockComponent();
            MockComponent object3 = new MockComponent();
            MockComponent object4 = new MockComponent();

            ObjectManager.AddChild(object1, true, true);
            ObjectManager.AddChild(object2, true, true);
            ObjectManager.AddChild(object3, true, true);
            ObjectManager.AddChild(object4, true, true);

            ObjectManager.Update(0);

            Assert.AreEqual(object1, ObjectManager.ChildAtIndex(0));
            Assert.AreEqual(object2, ObjectManager.ChildAtIndex(1));
            Assert.AreEqual(object3, ObjectManager.ChildAtIndex(2));
            Assert.AreEqual(object4, ObjectManager.ChildAtIndex(3));
        }
Beispiel #6
0
        public void Test_Component_Constructor()
        {
            MockComponent component = new MockComponent();

            component.CheckAlive();
        }