Ejemplo n.º 1
0
 public TeamGame(DateTime dateTime, Sport sport, Location location)
 {
     DateTime = dateTime;
     Sport = sport.Name;
     Location = location.Name;
     Id = Guid.NewGuid().ToString();
 }
Ejemplo n.º 2
0
 public PickUpGame(DateTime dateTime, Sport sport, Location location)
 {
     DateTime = dateTime;
     Sport = sport.Name;
     Location = location.Name;
     Id = Guid.NewGuid().ToString();
     PlayersIds = new List<string>();
 }
Ejemplo n.º 3
0
 public bool AddLocationToProfile(Profile profile, Location location)
 {
     using (var db = _connectionFactory.OpenDbConnection())
     using (var dbCmd = db.CreateCommand())
     {
         var playerLocationLink = CreatePlayerLocationLink(profile, location);
         dbCmd.Insert(playerLocationLink);
         return true;
     }
 }
Ejemplo n.º 4
0
 public void HasALocation()
 {
     var location = new Location("Bend");
     _teamGame.Location = location.Name;
 }
 public void SetUp()
 {
     _sport = new Sport { Name = SoccerName };
     _location = new Location { Name = LocationName };
     _pickUpGame = new PickUpGame(DateTime.Now, _sport, _location);
 }
Ejemplo n.º 6
0
 public static Location CreateLocationHamsterville()
 {
     _location2 = new Location("Hamsterville");
     return _location2;
 }
Ejemplo n.º 7
0
 public static Location CreateLocationBend()
 {
     _location1 = new Location("Bend");
     return _location1;
 }
Ejemplo n.º 8
0
 public PickUpGame CreatePickUpGame(DateTime dateTime, Sport sport, Location location, bool isPrivate = false)
 {
     return new PickUpGame(dateTime, sport, location) { IsPrivate = isPrivate };
 }
Ejemplo n.º 9
0
 public TeamGame CreateGameWithTeams(DateTime dateTime, Sport sport, Location location, bool isPrivate = false)
 {
     return new TeamGame(dateTime, sport, location) {IsPrivate = isPrivate};
 }
Ejemplo n.º 10
0
 public void SetUp()
 {
     _factory = new GameFactory();
     _sport = new Sport("Soccer");
     _location = new Location("Bend");
 }
Ejemplo n.º 11
0
 public void SetUp()
 {
     _location = new Location("Bend");
 }
Ejemplo n.º 12
0
 public void CanCreateWithAName()
 {
     const string name = "Moo";
     _location = new Location(name);
     Assert.That(_location.Name, Is.EqualTo(name));
 }
Ejemplo n.º 13
0
 public ProfileBuilder WithLocation(Location location)
 {
     Location = location;
     return this;
 }
 public void SetUp()
 {
     _sport = new Sport { Name = SoccerName };
     _location = new Location { Name = LocationName };
     _teamTeamGame = new TeamGame(DateTime.Now, _sport, _location);
     _mockGameRepo = new Mock<ITeamGameRepository>();
 }
Ejemplo n.º 15
0
 public void HasALocation()
 {
     var location = new Location("Bend");
     _game.Location = location.Name;
     Assert.That(_game.Location, Is.EqualTo(location.Name));
 }
Ejemplo n.º 16
0
 private PlayerLocationLink CreatePlayerLocationLink(Profile profile, Location location)
 {
     return new PlayerLocationLink
                {
                    PlayerId = profile.ProfileName,
                    Location = location.Name
                };
 }