Пример #1
0
        public void Initalize()
        {
            _factory = new MockRepository(MockBehavior.Loose);
            _container = new AutoMockContainer(_factory);
            _frameServiceMock = _container.GetMock<IFrameService>();
            _players = new List<Player>();
            _frames = new List<Frame>();
            var score = 0;

            var player_a = new Player() { FirstName = "Andrew", LastName = "Leaf", Frames = _frames, Score = score };
            var player_b = new Player() { FirstName = "Jennifer", LastName = "Leaf", Frames = _frames, Score = score };

            _players.Add(player_a);
            _players.Add(player_b);

            _gameService = new GameService(_frameServiceMock.Object);
        }
Пример #2
0
 public void Bowl(Player player)
 {
     throw new System.NotImplementedException();
 }
Пример #3
0
 public Player AddPlayer(string firstName, string lastName)
 {
     var player = new Player() {FirstName = firstName, LastName = lastName, Frames = new List<Frame>(), Score = 0};
     _game.Players.Add(player);
     return player;
 }