Exemple #1
0
        public void Setup()
        {
            _componentFactory = IoCManager.Resolve <IComponentFactory>();

            _componentFactory.Register <ThrowsInAddComponent>();
            _componentFactory.Register <ThrowsInExposeDataComponent>();
            _componentFactory.Register <ThrowsInInitializeComponent>();
            _componentFactory.Register <ThrowsInStartupComponent>();

            var compMan = IoCManager.Resolve <IComponentManager>();

            compMan.Initialize();

            EntityManager = IoCManager.Resolve <IServerEntityManager>();
            MapManager    = IoCManager.Resolve <IMapManager>();
            MapManager.Initialize();
            MapManager.Startup();

            MapManager.CreateNewMapEntity(MapId.Nullspace);

            var manager = IoCManager.Resolve <IPrototypeManager>();

            manager.LoadFromStream(new StringReader(PROTOTYPES));
            manager.Resync();

            //NOTE: The grids have not moved, so we can assert worldpos == localpos for the test
        }