private void InitServices(List<Golfer> unassigned, List<MastersParticipant> participants)
        {
            if(null == unassigned)
            {
                unassigned = new List<Golfer>();
            }

            if(null == participants)
            {
                participants = new List<MastersParticipant>();
            }
            golferService = MockRepository.GenerateStub<IGolferService>();
            configService = MockRepository.GenerateStub<IConfigurationService>();

            golferService.Stub(gs => gs.GetAllGolfers()).Return(unassigned);
            golferService.Stub(gs => gs.GetMastersParticipantsByYear(2009)).Return(participants);
            configService.Stub(cs => cs.GetConfigurationByKey("CurrentYear"))
                .Return(new MastersConfiguration { ConfigKey = "CurrentYear", ConfigValue = "2009" });
        }
Пример #2
0
 public AdminController(IConfigurationService cs, IGolferService gs)
 {
     this.configService = cs;
     this.golferService = gs;
 }
 public AdminViewModelBuilder(IConfigurationService cs, IGolferService gs)
 {
     this.configService = cs;
     this.golferService = gs;
 }
Пример #4
0
 public GolferController(IGolferService gs)
 {
     this.golferService = gs;
 }