Пример #1
0
        protected override void OverrideIoC()
        {
            base.OverrideIoC();
            //var mockFormat = new Mock<ICustomFormatManager>();
            var mock         = new Mock <IEntitySystemManager>();
            var broady       = new BroadPhaseSystem();
            var physics      = new PhysicsSystem();
            var gridFixtures = new GridFixtureSystem();
            var fixtures     = new FixtureSystem();

            // MOCKS WHY
            mock.Setup(m => m.GetEntitySystem <SharedBroadphaseSystem>()).Returns(broady);
            mock.Setup(m => m.GetEntitySystem <SharedPhysicsSystem>()).Returns(physics);
            mock.Setup(m => m.GetEntitySystem <GridFixtureSystem>()).Returns(gridFixtures);
            mock.Setup(m => m.GetEntitySystem <FixtureSystem>()).Returns(fixtures);

            IoCManager.RegisterInstance <IEntitySystemManager>(mock.Object, true);
            //IoCManager.RegisterInstance<ICustomFormatManager>(mockFormat.Object, true);

            // Mocking moment...
            IoCManager.BuildGraph();
            IoCManager.RegisterInstance <SharedBroadphaseSystem>(broady);
            IoCManager.InjectDependencies(fixtures);
        }
Пример #2
0
 public void Setup()
 {
     _shapeManager = new FixtureSystem();
 }