public override Task <List <CustomerConsumption> > GetPayments(GetCustomerPaymentsModel.Request request)
        {
            Cpf cpf  = "434.443.474-99";
            var date = new DateTime(2020, 12, 01);

            List <CustomerConsumption> result = new List <CustomerConsumption>
            {
                new CustomerConsumption {
                    Cpf = cpf.Value, MonthReference = date.Month, YearReference = date.Year, Value = 10
                },
                new CustomerConsumption {
                    Cpf = cpf.Value, MonthReference = date.Month, YearReference = date.Year, Value = 30
                }
            };

            return(Task.FromResult(result));
        }
        public async Task GetCustomerPayments_Handler_Test()
        {
            //Arrange
            Cpf cpf         = "434.443.474-99";
            var paymentDate = new DateTime(2020, 12, 01);
            var service     = GetInstance();

            var request = new GetCustomerPaymentsModel.Request
            {
                Cpf         = cpf.Value,
                PaymentDate = paymentDate.ToString("yyyy-MM-ddTHH:mm:ss")
            };

            //Act
            var result = await service.Handle(request, new System.Threading.CancellationToken());

            //Assert
            Assert.NotNull(result);
            Assert.Equal("2020-12", result.PaymentPeriod);
            Assert.Equal(40M, result.TotalValue);
        }
        public async Task <IActionResult> GetCustomerPaymentos([FromQuery] string cpf, string monthRefPaymentDate)
        {
            var request = new GetCustomerPaymentsModel.Request(cpf, monthRefPaymentDate);

            return(await _controllerHelper.ReturnAsync((request) => _mediator.Send(request), request));
        }