public List <FootballPlayer> Provide(TeamType teamType, HalfTime halfTime) { switch (teamType) { case TeamType.Home when halfTime == HalfTime.First: case TeamType.Away when halfTime == HalfTime.Second: return(CreateCopy(KickOffLeft)); case TeamType.Home when halfTime == HalfTime.Second: case TeamType.Away when halfTime == HalfTime.First: return(CreateCopy(KickOffRight)); default: return(CreateCopy(KickOffRight)); } }
public void SetUp() { _database = Substitute.For <IMongoDatabase>(); _collection = Substitute.For <IMongoCollection <Match> >(); _matchDao = new MatchDao(_database, _collection); _team1 = new Team { Name = "test", Email = "test", ShortName = "test", Tla = "test", CrestUrl = "test", Address = "test", Phone = "test", Colors = "test", Venue = "test" }; _team2 = new Team { Name = "test", Email = "test", ShortName = "test", Tla = "test", CrestUrl = "test", Address = "test", Phone = "test", Colors = "test", Venue = "test" }; _fullTime = new FullTime { AwayTeam = 1, HomeTeam = 1 }; _halfTime = new HalfTime { AwayTeam = 1, HomeTeam = 1 }; _extraTime = new ExtraTime { AwayTeam = 1, HomeTeam = 1 }; _penalties = new Penalties { AwayTeam = 1, HomeTeam = 1 }; _score = new Score { Winner = "test", Duration = "test", ExtraTime = _extraTime, FullTime = _fullTime, Penalties = _penalties }; _match = new Match { Status = "test", LastUpdated = DateTime.Now, HomeTeam = _team1, AwayTeam = _team2, Score = _score }; }
private void Start() { halftime = transform.root.gameObject.GetComponent <HalfTime>(); }