Ejemplo n.º 1
0
 private void CheckInPlayers()
 {
     foreach (Player player in TeamAOnCourt)
     {
         _playFactory.NewPlay(player, false);
         _playFactory.ChoosePlayType(PlayType.CheckIn);
         Plays.Add(_playFactory.GetPlays().First());
         _playFactory.Clear();
     }
     foreach (Player player in TeamBOnCourt)
     {
         _playFactory.NewPlay(player, true);
         _playFactory.ChoosePlayType(PlayType.CheckIn);
         Plays.Add(_playFactory.GetPlays().First());
         _playFactory.Clear();
     }
 }
Ejemplo n.º 2
0
        public void CheckIn_Two_Players()
        {
            _playFactory.NewPlay(_playerA, true);
            _playFactory.ChoosePlayType(PlayType.CheckIn);
            var _player1 = _playFactory.GetPlays().First().Player;

            _playFactory.Clear();
            _playFactory.NewPlay(_playerB, true);
            _playFactory.ChoosePlayType(PlayType.CheckIn);

            Assert.Multiple(() =>
            {
                var _plays = _playFactory.GetPlays();
                Assert.AreEqual(1, _plays.Count);
                Assert.AreEqual(PlayType.CheckIn, _plays.First().PlayType);
                Assert.AreEqual(_playerA, _player1);
                Assert.AreEqual(PlayType.CheckIn, _plays.Last().PlayType);
                Assert.AreEqual(_playerB, _plays.Last().Player);
            });
        }