public void Setup() { _defaultPlayer = new playerExtended { type = "what", country_code = "uk", date_of_birth = "2020-09-25", full_name = "John Smith", gender = "male", height = 180, heightSpecified = true, id = "sr:player:12345", jersey_number = 50, jersey_numberSpecified = true, name = "John Smith", nationality = "uk", nickname = "smithy", weight = 85, weightSpecified = true }; _defaultPlayerCompetitor = new playerCompetitor { id = "sr:player:12345", name = "John Smith", nationality = "uk", abbreviation = "JOH" }; _dataRouterManager = new TestDataRouterManager(new CacheManager()); }
/// <summary> /// Initializes a new instance of the <see cref="PlayerCompetitorDTO"/> class /// </summary> /// <param name="record">A <see cref="playerCompetitor"/> containing information about a player as a member of competitor</param> internal PlayerCompetitorDTO(playerCompetitor record) : base(new player { id = record.id, name = record.name }) { Contract.Requires(record != null); Abbreviation = record.abbreviation; Nationality = record.nationality; }
/// <summary> /// Initializes a new instance of the <see cref="PlayerCompetitorDTO"/> class /// </summary> /// <param name="record">A <see cref="playerCompetitor"/> containing information about a player as a member of competitor</param> internal PlayerCompetitorDTO(playerCompetitor record) : base(new player { id = record.id, name = record.name }) { Guard.Argument(record, nameof(record)).NotNull(); Abbreviation = record.abbreviation; Nationality = record.nationality; }