public void TransactionServices_CanGetTransactionsByCriteria() { // action _transactionServices.GetTransactionsByCriteria(new TransactionCriteria()); // assert _transactionBusinessLogic.Verify(x => x.GetByCriteria(It.IsAny <ITransactionCriteria>()), Times.Once); }
public IActionResult Get( string currency = "", string startDate = "", string endDate = "", string status = "") { var criteria = new TransactionCriteriaViewModel(currency, startDate, endDate, status).Convert(); IList <ITransaction> result = _transactionServices.GetTransactionsByCriteria(criteria); return(Ok(result.Select(x => new TransactionViewModel(x)))); }