示例#1
0
        public with_a_deal_in_cards_action()
        {
            double_down_spec = MockRepository.GenerateStub <ICanDoubleDown>();
            split_spec       = MockRepository.GenerateStub <ICanSplit>();
            insurance_spec   = MockRepository.GenerateStub <ICanTakeInsurance>();

            card_shoe = MockRepository.GenerateStub <ICardShoe>();
            positions = MockRepository.GenerateStub <IPlayingPositions>();

            player = MockRepository.GenerateStub <IPlayer>();

            players_hand = MockRepository.GenerateStub <IPlayersHand>();
            positions.Stub(x => x.players_active_hand).Return(players_hand);
            dealers_hand = MockRepository.GenerateStub <IDealersHand>();
            positions.Stub(x => x.dealers_hand).Return(dealers_hand);

            hand  = MockRepository.GenerateStub <IHand>();
            hands = new List <IHand>()
            {
                hand
            };
            positions.Stub(x => x.all_hands).Return(hands);

            hand_status_factory   = MockRepository.GenerateStub <IHandStatusFactory>();
            annouce_winner_action = MockRepository.GenerateStub <IAnnouceWinnerAction>();

            SUT = new Domain.GamePlay.Model.Dealer.Actions.DealCardsIn(hand_status_factory,
                                                                       annouce_winner_action,
                                                                       double_down_spec,
                                                                       split_spec,
                                                                       insurance_spec);
        }
        public with_a_deal_in_cards_action()
        {
            double_down_spec = MockRepository.GenerateStub<ICanDoubleDown>();
            split_spec = MockRepository.GenerateStub<ICanSplit>();
            insurance_spec = MockRepository.GenerateStub<ICanTakeInsurance>();

            card_shoe = MockRepository.GenerateStub<ICardShoe>();
            positions = MockRepository.GenerateStub<IPlayingPositions>();

            player = MockRepository.GenerateStub<IPlayer>();

            players_hand = MockRepository.GenerateStub<IPlayersHand>();
            positions.Stub(x => x.players_active_hand).Return(players_hand);
            dealers_hand = MockRepository.GenerateStub<IDealersHand>();
            positions.Stub(x => x.dealers_hand).Return(dealers_hand);

            hand = MockRepository.GenerateStub<IHand>();
            hands = new List<IHand>() { hand };
            positions.Stub(x => x.all_hands).Return(hands);

            hand_status_factory = MockRepository.GenerateStub<IHandStatusFactory>();
            annouce_winner_action = MockRepository.GenerateStub<IAnnouceWinnerAction>();

            SUT = new Domain.GamePlay.Model.Dealer.Actions.DealCardsIn(hand_status_factory, 
                                                                       annouce_winner_action,
                                                                       double_down_spec,
                                                                       split_spec,
                                                                       insurance_spec);
        }
 public DealCardsIn(IHandStatusFactory hand_status_factory, IAnnouceWinnerAction annouce_winner_action,
                    ICanDoubleDown double_down_spec, ICanSplit split_spec, ICanTakeInsurance insurance_spec)
 {
     _hand_status_factory   = hand_status_factory;
     _annouce_winner_action = annouce_winner_action;
     _double_down_spec      = double_down_spec;
     _split_spec            = split_spec;
     _insurance_spec        = insurance_spec;
 }
 public DealCardsIn(IHandStatusFactory hand_status_factory, IAnnouceWinnerAction annouce_winner_action, 
                    ICanDoubleDown double_down_spec, ICanSplit split_spec, ICanTakeInsurance insurance_spec)
 {
     _hand_status_factory = hand_status_factory;
     _annouce_winner_action = annouce_winner_action;
     _double_down_spec = double_down_spec;
     _split_spec = split_spec;
     _insurance_spec = insurance_spec;
 }