示例#1
0
        public void GivenUserSeeExpandedTransactionInfoWithDestination(PurseTransactionDestination destinationId, int row, string direction, List <UITable> expectedTransactions)
        {
            //Удаляем из ожидаемой таблицы строку с Датой., т.к. проверяется ниже
            expectedTransactions.RemoveAll(it => it.Column1.Equals("Транзакция №"));

            CheckStatement(row, expectedTransactions);
        }
示例#2
0
 public long GetPurseTransactionIdByDestinationAndDirection(string UserId, PurseTransactionDestination destinationId, string direction)
 {
     return(new DataBaseSteps(_context)
            .GetPurseTransactionsByUserId(UserId)
            .Where(it => (it.DestinationId == destinationId) && (it.Direction.Equals(direction)))
            .Single().PurseTransactionId);
 }
        public void ExpandedTransactionInfoWithDestinationForCreatedUser(PurseTransactionDestination destinationId, int row, string direction, List <UITable> expectedTransactions)
        {
            var purseId = new MenuPanel().GetPurseId();

            expectedTransactions.Select(x =>
            {
                x.Column2 = x.Column2.Replace("**ReceiverPurse**", purseId);
                x.Column2 = x.Column2.Replace("Email", _context.Email);
                x.Column2 = x.Column2.Replace("Phone", _context.PhoneNumber);
                return(x);
            }).ToList();

            _context.InvoiceId = new DataBaseSteps(_context).GetLastInvoiceByUserId(Guid.Parse(_context.UserId.ToString())).InvoiceId;

            _context.PurseTransactionId = new StatementsSteps(_context).GetPurseTransactionIdByDestinationAndDirection(_context.UserId.ToString(), destinationId, direction);

            new StatementsSteps(_context).CheckStatement(row, expectedTransactions);
        }
示例#4
0
 public void GivenUserSeeQuittanceWithTransactionNumber(string userId, PurseTransactionDestination destinationId, List <UITable> expectedTable)
 {
     expectedTable[0].Column2 = new StatementsSteps(_context).GetPurseTransactionIdByDestinationAndDirection(userId, destinationId, "out").ToString();
     GivenUserSeeQuittance(expectedTable);
 }
示例#5
0
        public void GivenUserSeeExpandedTransactionInfoWithDestination(string UserId, PurseTransactionDestination destinationId, int row, string direction, List <UITable> expectedTransactions)
        {
            var lastInvoice = new DataBaseSteps(_context).GetLastInvoiceByUserId(Guid.Parse(UserId));

            _context.InvoiceId             = lastInvoice.InvoiceId;
            _context.ExternalTransactionId = lastInvoice.ExternalTransaction;
            _context.PurseTransactionId    = GetPurseTransactionIdByDestinationAndDirection(UserId, destinationId, direction);

            CheckStatement(row, expectedTransactions);
        }
示例#6
0
 public void GivenUserSeeExpandedTransactionInfoWithDestinationNoInvoice(string UserId, PurseTransactionDestination destinationId, int row, string direction, List <UITable> expectedTransactions)
 {
     _context.PurseTransactionId = GetPurseTransactionIdByDestinationAndDirection(UserId, destinationId, direction);
     CheckStatement(row, expectedTransactions);
 }