示例#1
0
        public void ToStringWithArrayAndBehavior()
        {
            entityWithTags.Add(new Vector2D[2]);
            Assert.AreEqual("MockEntity Tags=Tag1, Tag2: Vector2D[]", entityWithTags.ToString());
            var entityWithRunner =
                new MockEntity().Start <MockUpdateBehavior>().Start <ComponentTests.Rotate>();

            Assert.AreEqual("MockEntity [MockUpdateBehavior, Rotate]", entityWithRunner.ToString());
        }
示例#2
0
        public void ToStringWithComponentAndList()
        {
            entityWithTags.IsActive = false;
            Assert.AreEqual("<Inactive> MockEntity Tags=Tag1, Tag2", entityWithTags.ToString());
            var entityWithComponent = new MockEntity().Add(new object()).Add(new Vector2D(1, 2));

            Assert.AreEqual("MockEntity: Object, Vector2D=1, 2", entityWithComponent.ToString());
            var entityWithList = new MockEntity().Add(new List <Color>());

            Assert.AreEqual("MockEntity: List<Color>", entityWithList.ToString());
        }