public void GivenAPlayerWithCurrentAbility(int ability) { var playerModel = new PlayerModel { CurrentAbility = ability }; _context.AddPlayer(playerModel); }
public void GivenAPlayerWithAge(int age) { var playerModel = new PlayerModel { Age = age }; _context.AddPlayer(playerModel); }
private Player(PlayerModel model) { _age = model.Age; _name = model.Name; _currentAbility = model.CurrentAbility; _potentialAbility = model.PotentialAbilty; _positions = ConvertPositions(model); }
private static List<Position> ConvertPositions(PlayerModel model) { return model.Positions == null ? null : model.Positions.Select( p => new Position { Ability = p.Ability, Name = p.Name }).ToList(); }
public void GivenAPlayerWithAbilityInPosition(int ability, string position) { var playerModel = new PlayerModel { Positions = new[] { new Position { Ability = ability, Name = position } } }; _context.AddPlayer(playerModel); }
public void AddPlayer(PlayerModel player) { _players.Add(player); }
public void GivenAPlayerWithPotentialAbility(int potential) { var playerModel = new PlayerModel { PotentialAbilty = potential }; _context.AddPlayer(playerModel); }
public void GivenAPlayerWithName(string name) { var playerModel = new PlayerModel { Name = name }; _context.AddPlayer(playerModel); }
public static Player CreatePlayer(PlayerModel model) { return new Player(model); }