public void ShouldThrowExceptionWhenMapToTransactionViewModelWithEmptyTransactionDto()
        {
            // Arrange
            WalletManagerDTO.Transaction transactionDtoFaker = null;

            // Act
            Action mapAction = () => _ = _mapper.MapToTransactionViewModel(transactionDtoFaker);

            // Assert
            Assert.Throws <ArgumentNullException>(mapAction);
        }
        public TransactionChartViewModel MapToTransactionChartViewModel(WalletManagerDTO.Transaction transaction)
        {
            if (transaction == null)
            {
                throw new ArgumentNullException();
            }

            return(new TransactionChartViewModel
            {
                Amount = transaction.Amount < 0 ? transaction.Amount * -1 : transaction.Amount,
                Category = transaction.Category.Name,
            });
        }
        public TransactionViewModel MapToTransactionViewModel(WalletManagerDTO.Transaction transaction)
        {
            if (transaction == null)
            {
                throw new ArgumentNullException();
            }

            return(new TransactionViewModel
            {
                Amount = transaction.Amount,
                Category = transaction.Category,
                Compte = transaction.Compte,
                Label = transaction.Label,
                OperationDate = transaction.OperationDate,
                Reference = transaction.Reference
            });
        }