public void ConvertPreflop_Player1IsSmallBlind__SetsSequencesCorrectly()
        {
            RelativeRatioResult   result           = ConvertPreflopThreePlayersHand();
            IConvertedPokerHand   convHand         = result.ConvertedHand;
            IConvertedPokerPlayer smallBlindPlayer = convHand[0];
            IConvertedPokerPlayer bigBlindPlayer   = convHand[1];
            IConvertedPokerPlayer buttonPlayer     = convHand[2];

            var action1 = new ConvertedPokerActionWithId(buttonPlayer[Streets.PreFlop][0], buttonPlayer.Position);
            var action2 = new ConvertedPokerActionWithId(
                smallBlindPlayer[Streets.PreFlop][0], smallBlindPlayer.Position);
            var action3 = new ConvertedPokerActionWithId(bigBlindPlayer[Streets.PreFlop][0], bigBlindPlayer.Position);
            var action4 = new ConvertedPokerActionWithId(buttonPlayer[Streets.PreFlop][1], buttonPlayer.Position);
            var action5 = new ConvertedPokerActionWithId(
                smallBlindPlayer[Streets.PreFlop][1], smallBlindPlayer.Position);
            var action6 = new ConvertedPokerActionWithId(bigBlindPlayer[Streets.PreFlop][1], bigBlindPlayer.Position);

            IConvertedPokerRound expectedPreflopSequence = new ConvertedPokerRound()
                                                           .Add(action1)
                                                           .Add(action2)
                                                           .Add(action3)
                                                           .Add(action4)
                                                           .Add(action5)
                                                           .Add(action6);

            Assert.That(expectedPreflopSequence, Is.EqualTo(convHand.Sequences[(int)Streets.PreFlop]));
        }
        public void ConvertedRoundFrom_PokerActionWithId_ReturnsRoundWithPokerActionWithGivenId()
        {
            const ActionTypes actionType1 = ActionTypes.B;
            const double      ratio1      = 0.5;
            const int         playerId    = 2;

            var expectedAction = new ConvertedPokerActionWithId(
                new ConvertedPokerAction(actionType1, ratio1), playerId);

            string csvString =
                "[" + playerId + "]" + actionType1 + ratio1;

            IConvertedPokerRound round = _converter.ConvertedRoundFrom(csvString);
            var firstAction            = round[0] as IConvertedPokerActionWithId;

            Assert.That(firstAction, Is.EqualTo(expectedAction));
        }
        public void ProcessRound_PreflopAquPlayerWithOneRound_AddsActionAndPlayerIdToSequencesForCurrentRound()
        {
            const int             playerPosition = 1;
            IConvertedPokerPlayer playerStub     = new ConvertedPokerPlayer()
                                                   .Add();

            playerStub.Position = playerPosition;

            IAquiredPokerRound aquiredRound =
                new AquiredPokerRound()
                .Add(new AquiredPokerAction(_stub.Valid(For.ActionType, ActionTypes.C), _stub.Some <double>()));

            var expectedAction =
                new ConvertedPokerActionWithId(new ConvertedPokerAction(ActionTypes.C, 0), playerPosition);

            _converter.InvokeProcessRound(Streets.PreFlop, aquiredRound, playerStub);

            Assert.That(_converter.SequenceForCurrentRoundProp[0], Is.EqualTo(expectedAction));
        }