Exemple #1
0
        public void ShouldHaveListOfRegroupedTransactionWhenIGetGroupedTransactions()
        {
            // Arrange
            var faker   = new Faker();
            var csvPath = faker.Random.String2(2);

            _transactionServices.LoadTransactions(csvPath);
            const decimal expectedGroupedPaypalAmount = -25;

            // Act
            var transactions      = _transactionServices.GetGroupedTransactionsByLabel();
            var paypalTransaction = transactions.FirstOrDefault(t => t.Label.Contains("PAYPAL         750800"));

            // Assert
            Assert.Equal(expectedGroupedPaypalAmount, Math.Round(paypalTransaction.Amount, 2));
        }