Beispiel #1
0
        public void MudInstance_StartMud()
        {
            Mock <IGlobalValues> globalValues = new Mock <IGlobalValues>();
            Mock <ILogger>       logger       = new Mock <ILogger>();
            Mock <IWorld>        world        = new Mock <IWorld>();
            Mock <ITickTimes>    tickTimes    = new Mock <ITickTimes>();

            globalValues.Setup(e => e.Logger).Returns(logger.Object);
            globalValues.Setup(e => e.World).Returns(world.Object);
            globalValues.Setup(e => e.TickTimes).Returns(tickTimes.Object);

            GlobalReference.GlobalValues = globalValues.Object;

            mud.StartMud();

            logger.Verify(e => e.Log(LogLevel.INFO, "Loading World"), Times.Once);
            world.Verify(e => e.LoadWorld(), Times.Once);
            logger.Verify(e => e.Log(LogLevel.INFO, "Starting Heartbeat"), Times.Once);
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            //Console.WriteLine("Pause Profiling");
            //Console.ReadLine();

            MudInstance instance = new MudInstance();

            LoadServerSettings();

            instance.StartMud();

            //Console.WriteLine("Restart Profiling");
            //Console.ReadLine();

            ConnectionHandler connectionHandler = new ConnectionHandler(new JsonMudMessage());
        }