Exemplo n.º 1
0
 public Contest()
 {
     FlippingContainer.Instance.ComposeParts(this);
     _gameSetting                 = new ReferenceHolder <IGameSetting, Guid>(GameSettingRepository);
     _physicalSetting             = new ReferenceHolder <IPhysicalSetting, Guid>(PhysicalSettingRepository);
     _eliminationSetting          = new ReferenceHolder <IEliminationStepSetting, Guid>(EliminationStepSettingRepository);
     _consolingEliminationSetting = new ReferenceHolder <IEliminationStepSetting, Guid>(EliminationStepSettingRepository);
     _qualificationSetting        = new ReferenceHolder <IQualificationStepSetting, Guid>(QualificationStepSettingRepository);
     _phaseList = new Lazy <IList <IPhase> >(() => PhaseRepository.Find(_ => _.ContestId == Id).ToList());
     _fieldList = new Lazy <IList <IField> >(() => FieldRepository.Find(_ => _.CurrentContestId == Id).ToList());
     _teamList  = new Lazy <IList <ITeam> >(() => TeamRepository.Find(_ => _.ContestId == Id).ToList());
 }
 public void TestFind()
 {
     phaseRepository.Add(phase);
     Assert.AreEqual(phaseRepository.Find(phase.PhaseId).Name, "Test");
     phaseRepository.Delete(phase);
 }