예제 #1
0
 public TeamGame(DateTime dateTime, Sport sport, Location location)
 {
     DateTime = dateTime;
     Sport = sport.Name;
     Location = location.Name;
     Id = Guid.NewGuid().ToString();
 }
예제 #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>();
 }
예제 #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;
     }
 }
예제 #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);
 }
예제 #6
0
 public static Location CreateLocationHamsterville()
 {
     _location2 = new Location("Hamsterville");
     return _location2;
 }
예제 #7
0
 public static Location CreateLocationBend()
 {
     _location1 = new Location("Bend");
     return _location1;
 }
예제 #8
0
 public PickUpGame CreatePickUpGame(DateTime dateTime, Sport sport, Location location, bool isPrivate = false)
 {
     return new PickUpGame(dateTime, sport, location) { IsPrivate = isPrivate };
 }
예제 #9
0
 public TeamGame CreateGameWithTeams(DateTime dateTime, Sport sport, Location location, bool isPrivate = false)
 {
     return new TeamGame(dateTime, sport, location) {IsPrivate = isPrivate};
 }
예제 #10
0
 public void SetUp()
 {
     _factory = new GameFactory();
     _sport = new Sport("Soccer");
     _location = new Location("Bend");
 }
예제 #11
0
 public void SetUp()
 {
     _location = new Location("Bend");
 }
예제 #12
0
 public void CanCreateWithAName()
 {
     const string name = "Moo";
     _location = new Location(name);
     Assert.That(_location.Name, Is.EqualTo(name));
 }
예제 #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>();
 }
예제 #15
0
 public void HasALocation()
 {
     var location = new Location("Bend");
     _game.Location = location.Name;
     Assert.That(_game.Location, Is.EqualTo(location.Name));
 }
예제 #16
0
 private PlayerLocationLink CreatePlayerLocationLink(Profile profile, Location location)
 {
     return new PlayerLocationLink
                {
                    PlayerId = profile.ProfileName,
                    Location = location.Name
                };
 }