public void GivenUserSeeExpandedTransactionInfoWithDestination(PurseTransactionDestination destinationId, int row, string direction, List <UITable> expectedTransactions) { //Удаляем из ожидаемой таблицы строку с Датой., т.к. проверяется ниже expectedTransactions.RemoveAll(it => it.Column1.Equals("Транзакция №")); CheckStatement(row, expectedTransactions); }
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); }
public void GivenUserSeeQuittanceWithTransactionNumber(string userId, PurseTransactionDestination destinationId, List <UITable> expectedTable) { expectedTable[0].Column2 = new StatementsSteps(_context).GetPurseTransactionIdByDestinationAndDirection(userId, destinationId, "out").ToString(); GivenUserSeeQuittance(expectedTable); }
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); }
public void GivenUserSeeExpandedTransactionInfoWithDestinationNoInvoice(string UserId, PurseTransactionDestination destinationId, int row, string direction, List <UITable> expectedTransactions) { _context.PurseTransactionId = GetPurseTransactionIdByDestinationAndDirection(UserId, destinationId, direction); CheckStatement(row, expectedTransactions); }