Esempio n. 1
0
        public void New_RegisteredSystem_EntityDoesNotMeetRequirements_DoesNotRegister()
        {
            var system = Substitute.For <ISystem>();

            system.RequiredComponents.Returns(new SystemComponents {
                typeof(Appearance)
            });
            system.ForbiddenComponents.Returns(new SystemComponents());

            engine.Register(system);

            var testEntity = engine.New("testEntity");

            system.DidNotReceive().AddEntity(testEntity);
        }