コード例 #1
0
        protected bool RunBaseReflectionUnitTests()
        {
            bool result = true;

            if (!SandboxGameAssemblyWrapper.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("SandboxGameAssemblyWrapper reflection validation failed!");
            }

            if (!ServerAssemblyWrapper.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("ServerAssemblyWrapper reflection validation failed!");
            }

            if (!NetworkManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("NetworkManager reflection validation failed!");
            }

            if (!ServerNetworkManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("ServerNetworkManager reflection validation failed!");
            }

            if (!UtilityFunctions.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("UtilityFunctions reflection validation failed!");
            }

            if (!ChatManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("ChatManager reflection validation failed!");
            }

            if (!PlayerMap.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("PlayerMap reflection validation failed!");
            }

            if (!PlayerManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("PlayerManager reflection validation failed!");
            }

            if (!WorldManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("WorldManager reflection validation failed!");
            }

            if (!RadioManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("RadioManager reflection validation failed!");
            }

            if (!RadioManagerNetworkManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("RadioManagerNetworkManager reflection validation failed!");
            }

            if (!PowerManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("PowerManager reflection validation failed!");
            }

            if (!FactionsManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("FactionsManager reflection validation failed!");
            }

            if (!Faction.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("Faction reflection validation failed!");
            }

            if (!GameEntityManager.ReflectionUnitTest())
            {
                result = false;
                Console.WriteLine("GameEntityManager reflection validation failed!");
            }

            if (result)
            {
                Console.WriteLine("All main types passed reflection unit tests!");
            }

            return(result);
        }
コード例 #2
0
        protected bool RunBaseReflectionUnitTests()
        {
            bool result = true;

            if (!DedicatedServerAssemblyWrapper.ReflectionUnitTest())
            {
                result = false;
                BaseLog.Warn("DedicatedServerAssemblyWrapper reflection validation failed!");
            }

            if (!ServerNetworkManager.ReflectionUnitTest())
            {
                result = false;
                BaseLog.Warn("ServerNetworkManager reflection validation failed!");
            }

            if (!UtilityFunctions.ReflectionUnitTest())
            {
                result = false;
                BaseLog.Warn("UtilityFunctions reflection validation failed!");
            }

            if (!ChatManager.ReflectionUnitTest())
            {
                result = false;
                BaseLog.Warn("ChatManager reflection validation failed!");
            }

            if (!PlayerMap.ReflectionUnitTest())
            {
                result = false;
                BaseLog.Warn("PlayerMap reflection validation failed!");
            }

            if (!PlayerManager.ReflectionUnitTest())
            {
                result = false;
                BaseLog.Warn("PlayerManager reflection validation failed!");
            }

            if (!WorldManager.ReflectionUnitTest())
            {
                result = false;
                BaseLog.Warn("WorldManager reflection validation failed!");
            }

            /*
             *          if (!RadioManager.ReflectionUnitTest())
             *          {
             *                  result = false;
             *                  BaseLog.Warn( "RadioManager reflection validation failed!" );
             *          }
             *
             *          if (!RadioManagerNetworkManager.ReflectionUnitTest())
             *          {
             *                  result = false;
             *                  BaseLog.Warn( "RadioManagerNetworkManager reflection validation failed!" );
             *          }
             *
             * if (!FactionsManager.ReflectionUnitTest())
             *          {
             *                  result = false;
             *                  BaseLog.Warn( "FactionsManager reflection validation failed!" );
             *          }
             *
             *          if (!Faction.ReflectionUnitTest())
             *          {
             *                  result = false;
             *                  BaseLog.Warn( "Faction reflection validation failed!" );
             *          }
             */

            if (!GameEntityManager.ReflectionUnitTest())
            {
                result = false;
                BaseLog.Warn("GameEntityManager reflection validation failed!");
            }

            if (result)
            {
                BaseLog.Info("All main types passed reflection unit tests!");
            }

            return(result);
        }