BolfTracker.Infrastructure.EntityFramework.IntegrationTests.ObjectMother.CreateGameStatistics C# (CSharp) 메소드

CreateGameStatistics() 공개 정적인 메소드

public static CreateGameStatistics ( BolfTracker.Models.Game game ) : BolfTracker.Models.GameStatistics
game BolfTracker.Models.Game
리턴 BolfTracker.Models.GameStatistics
        public static GameStatistics CreateGameStatistics(Game game)
        {
            return new GameStatistics
            {
                Game = game,
                HoleCount = 10,
                PlayerCount = 9,
                Points = 8,
                ShotsMade = 7,
                ShotsMissed = 6,
                Attempts = 5,
                Pushes = 4,
                Steals = 3,
                SugarFreeSteals = 2,
                StainlessSteals = 1,
                OvertimeCount = 0,
                ShootingPercentage = 0.234M
            };
        }

Usage Example

        public void ShouldBeAbleToAddGameStatistics()
        {
            var game = ObjectMother.CreateGame();

            _gameRepository.Add(game);

            var gameStatistics = ObjectMother.CreateGameStatistics(game);

            _gameStatisticsRepository.Add(gameStatistics);

            Assert.AreNotEqual(0, gameStatistics.Id);
        }
All Usage Examples Of BolfTracker.Infrastructure.EntityFramework.IntegrationTests.ObjectMother::CreateGameStatistics