public static CreateGameStatistics ( BolfTracker.Models.Game game ) : BolfTracker.Models.GameStatistics | ||
game | BolfTracker.Models.Game | |
Résultat | BolfTracker.Models.GameStatistics |
public void ShouldBeAbleToAddGameStatistics() { var game = ObjectMother.CreateGame(); _gameRepository.Add(game); var gameStatistics = ObjectMother.CreateGameStatistics(game); _gameStatisticsRepository.Add(gameStatistics); Assert.AreNotEqual(0, gameStatistics.Id); }
public void ShouldBeAbleToDeleteGameStatistics() { var game = ObjectMother.CreateGame(); _gameRepository.Add(game); var gameStatistics = ObjectMother.CreateGameStatistics(game); _gameStatisticsRepository.Add(gameStatistics); _gameStatisticsRepository.Delete(gameStatistics); Assert.IsNotNull(_gameRepository.GetById(game.Id)); Assert.IsNull(_gameStatisticsRepository.GetById(gameStatistics.Id)); }