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

CreateShotType() 공개 정적인 메소드

public static CreateShotType ( ) : BolfTracker.Models.ShotType
리턴 BolfTracker.Models.ShotType
        public static ShotType CreateShotType()
        {
            return new ShotType
            {
                Id = Int32.MaxValue,
                Name = Random(),
                Description = Random()
            };
        }

Usage Example

예제 #1
0
        public void Should_be_able_to_add_player_rivalry_statistics()
        {
            var game = ObjectMother.CreateGame();

            _gameRepository.Add(game);

            var player         = ObjectMother.CreatePlayer();
            var affectedPlayer = ObjectMother.CreatePlayer();

            _playerRepository.Add(player);
            _playerRepository.Add(affectedPlayer);

            var hole = ObjectMother.CreateHole(Int32.MaxValue);

            _holeRepository.Add(hole);

            var shotType = ObjectMother.CreateShotType();

            _shotTypeRepository.Add(shotType);

            var playerRivalryStatistics = ObjectMother.CreatePlayerRivalryStatistics(game, player, affectedPlayer, hole, shotType);

            _playerRivalryStatisticsRepository.Add(playerRivalryStatistics);

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