Ejemplo n.º 1
0
        public ActionResult Postings()
        {
            var customerAccounts = _context.CustomerAccounts.Include(c => c.Customer).Include(c => c.Branch).Include(c => c.AccountType).ToList();
            var count            = _context.TellerPostings.Count();
            var postingType1     = new PostingTypes();

            postingType1.Id   = 1;
            postingType1.Name = "Deposit";
            var postingType2 = new PostingTypes();

            postingType2.Id   = 2;
            postingType2.Name = "Withdrawal";

            var postingTypes = new List <string>
            {
                "Deposit",
                "Withdrawal"
            };

            var viewModel = new TellerPostingViewModel()
            {
                CustomerAccounts = customerAccounts,
                PostingType      = postingTypes.ToList(),
                TellerPosting    = new TellerPosting(),
                count            = count
            };

            return(View("TellerPosting", viewModel));
        }
        public void Parse_PlayerHasOnePostingAction_AddsActionWithRatioToPlayerActions(
            [Values(PostingTypes.Ante, PostingTypes.BigBlind, PostingTypes.SmallBlind)] PostingTypes postingType)
        {
            const double      someRatio  = 1.0;
            const ActionTypes actionType = ActionTypes.P;
            var aquiredPokerAction       = new AquiredPokerAction(actionType, someRatio);

            string streetHistory = PostingActionFor(PlayerName, postingType, someRatio);

            _parser.Parse(streetHistory, PlayerName);

            Affirm.That(_parser.PlayerActions.First()).IsEqualTo(aquiredPokerAction);
        }
Ejemplo n.º 3
0
        protected override string PostingActionFor(string playerName, PostingTypes postingType, double ratio)
        {
            if (postingType == PostingTypes.Ante)
            {
                // monzaaa: posts the ante 25
                return(string.Format("{0}: posts the ante {1}", playerName, ratio));
            }

            if (postingType == PostingTypes.SmallBlind)
            {
                // Gryko13: posts small blind $0.10
                return(string.Format("{0}: posts small blind ${1}", playerName, ratio));
            }

            if (postingType == PostingTypes.BigBlind)
            {
                // evgueni88: posts big blind $0.25
                return(string.Format("{0}: posts big blind ${1}", playerName, ratio));
            }

            throw new ArgumentException(postingType.ToString());
        }
Ejemplo n.º 4
0
        protected override string PostingActionFor(string playerName, PostingTypes postingType, double ratio)
        {
            if (postingType == PostingTypes.Ante)
            {
                // Hero antes 50
                return(string.Format("{0} antes {1}", playerName, ratio));
            }

            if (postingType == PostingTypes.SmallBlind)
            {
                // enzonapoletano posts the small blind of $0.10
                return(string.Format("{0} posts the small blind of ${1}", playerName, ratio));
            }

            if (postingType == PostingTypes.BigBlind)
            {
                // Hero posts the big blind of $0.25
                return(string.Format("{0} posts the big blind of ${1}", playerName, ratio));
            }

            throw new ArgumentException(postingType.ToString());
        }
 protected abstract string PostingActionFor(string playerName, PostingTypes postingType, double ratio);