示例#1
0
        public void RepositoryInitializeTest()
        {
            var context    = new ClientCompositionRoot(new TestsCompositionRoot(null));
            var repository = context.Resolve <IRepository>();

            context.Resolve <SimulationService>().LocalId = new PlayerId("player_".MakeUnique());
            repository.ReloadConfig();
            repository.ReloadState(2);
            repository.SetTeam(new TeamId("team_".MakeUnique()));
            repository.SetTeam(new TeamId("team_".MakeUnique()));
            repository.ShiftStates();
            repository.ShiftStates();
            repository.ShiftStates();
            repository.ShiftStates();
            context.Release();
        }
示例#2
0
        public void InstantiateServiceTest()
        {
            var context = new ClientCompositionRoot(new TestsCompositionRoot(null));

            context.RegisterInstance <INetworkClientConnection>(new NetworkConnectionStub());
            context.Resolve <SimulationService>().Initialize();
            context.Release();
        }