public void RecursiveGroupIsError()
        {
            LogAssert.Expect(LogType.Error, new System.Text.RegularExpressions.Regex("Found circular chain in update groups involving:"));

            var systems = new HashSet <ScriptBehaviourManager>();

            systems.Add(new RecursiveSystem());
            ScriptBehaviourUpdateOrder.InsertManagersInPlayerLoop(systems, m_fakePlayerLoop);
        }
        public void OverConstrainedEngineIsError()
        {
            // The error is triggered for each system in a chain, not for each chain - so there will be three errors
            LogAssert.Expect(LogType.Error, new System.Text.RegularExpressions.Regex("is over constrained with engine containts"));

            var systems = new HashSet <ScriptBehaviourManager>();

            systems.Add(new SimpleOverconstrainedSystem());
            ScriptBehaviourUpdateOrder.InsertManagersInPlayerLoop(systems, m_fakePlayerLoop);
        }
        public void CircularDependencyIsError()
        {
            // The error is triggered for each system in a chain, not for each chain - so there will be three errors
            LogAssert.Expect(LogType.Error, new System.Text.RegularExpressions.Regex("is in a chain of circular dependencies"));
            LogAssert.Expect(LogType.Error, new System.Text.RegularExpressions.Regex("is in a chain of circular dependencies"));
            LogAssert.Expect(LogType.Error, new System.Text.RegularExpressions.Regex("is in a chain of circular dependencies"));

            var systems = new HashSet <ScriptBehaviourManager>();

            systems.Add(new SimpleCircularSystem1());
            systems.Add(new SimpleCircularSystem2());
            systems.Add(new SimpleCircularSystem3());
            ScriptBehaviourUpdateOrder.InsertManagersInPlayerLoop(systems, m_fakePlayerLoop);
        }