예제 #1
0
        public void GetAll_ReturnsAllInstancesOfComponent()
        {
            var appearance1  = new Appearance();
            var testEntity1  = engine.New("testEntity1", appearance1);
            var testEntity2  = engine.New("testEntity2");
            var appearance3  = new Appearance();
            var appearance3a = new Appearance();
            var testEntity3  = engine.New("testEntity3", appearance3, appearance3a, new Prototype());

            var result = engine.GetAll <Appearance>();

            result.Should().BeEquivalentTo(new List <Appearance> {
                appearance1
            });

            result = engine.GetAll <Appearance>(includePrototypes: true);

            result.Should().BeEquivalentTo(new List <Appearance> {
                appearance1, appearance3, appearance3a
            });
        }