예제 #1
0
파일: Client.cs 프로젝트: KonH/BattlerGame
        public Client AddServerApiService()
        {
            var env = new EnvironmentService {
                IsDebugMode = true
            };
            var users    = new InMemoryUserRepository();
            var states   = new InMemoryGameStateRepository();
            var register = new GameLogics.Server.Service.RegisterService(users);
            var config   = new FileConfigRepository(Convert, "Config.json");
            var auth     = new GameLogics.Server.Service.AuthService(Logger, new MockTokenService(), Time, users, states, config, new StateInitService());
            var intent   = new IntentService(env, Logger, Time, users, states, config);

            Api = new ConvertedServerApiService(Convert, Logger, new TerminateErrorHandleStrategy(Logger), register, auth, intent);

            AddCommon();

            return(this);
        }
예제 #2
0
        void IsDefaultConfigSerialized()
        {
            var repo = new FileConfigRepository(_service, "../../../../UnityClient/Assets/Resources/Config.json");

            Assert.NotNull(repo.Get());
        }