コード例 #1
0
 public GuardianService(IGuardianRepository guardianRepository, IGuardianEloRepository guardianEloRepository,
                        IGuardianEfficiencyRepository guardianEfficiencyRepository, IGuardianMatchResultsRepository matchResultsRepository)
 {
     _guardianRepository           = guardianRepository;
     _guardianEloRepository        = guardianEloRepository;
     _guardianEfficiencyRepository = guardianEfficiencyRepository;
     _matchResultsRepository       = matchResultsRepository;
 }
コード例 #2
0
 public MatchMakingService(IGuardianRepository guardianRepository,
                           IGuardianEloRepository guardianEloRepository,
                           IGuardianEfficiencyRepository guardianEfficiencyRepository,
                           IMatchMakingRepository matchMakingRepository)
 {
     _guardianRepository           = guardianRepository;
     _guardianEloRepository        = guardianEloRepository;
     _guardianEfficiencyRepository = guardianEfficiencyRepository;
     _matchMakingRepository        = matchMakingRepository;
 }
コード例 #3
0
        public void Setup()
        {
            _testGuardian = new Guardian()
            {
                GamerTag = "testy_mctesterson", Id = "abc-ez-as-123"
            };
            _guardianRepository     = Substitute.For <IGuardianRepository>();
            _eloRepository          = Substitute.For <IGuardianEloRepository>();
            _efficiencyRepository   = Substitute.For <IGuardianEfficiencyRepository>();
            _matchResultsRepository = Substitute.For <IGuardianMatchResultsRepository>();

            _guardianRepository.CreateGuardian(Arg.Any <Guardian>()).ReturnsForAnyArgs(_testGuardian.Id);

            _guardianService = new GuardianService(_guardianRepository, _eloRepository, _efficiencyRepository,
                                                   _matchResultsRepository);
        }