From 23f950fd4889f689a67c8eabb5870ebdccad0a47 Mon Sep 17 00:00:00 2001 From: Victor Ross Date: Sat, 12 Oct 2024 01:07:43 -0300 Subject: [PATCH] CODE: Fix --- api/pom.xml | 23 ------------------- .../di/service/CalculadoraServiceTest.java | 10 ++++---- 2 files changed, 5 insertions(+), 28 deletions(-) diff --git a/api/pom.xml b/api/pom.xml index 0dcf2c1..d31a27d 100644 --- a/api/pom.xml +++ b/api/pom.xml @@ -87,29 +87,6 @@ - - org.openapitools - openapi-generator-maven-plugin - 7.8.0 - - - contract.yml - - generate - - - true - ./src/main/resources/swagger/contract.yml - spring - - false - true - true - - - - - org.openapitools openapi-generator-maven-plugin diff --git a/api/src/test/java/com/calculadora/renda/fixa/di/service/CalculadoraServiceTest.java b/api/src/test/java/com/calculadora/renda/fixa/di/service/CalculadoraServiceTest.java index 9b28dad..263bde6 100644 --- a/api/src/test/java/com/calculadora/renda/fixa/di/service/CalculadoraServiceTest.java +++ b/api/src/test/java/com/calculadora/renda/fixa/di/service/CalculadoraServiceTest.java @@ -22,18 +22,18 @@ public class CalculadoraServiceTest { @DisplayName("Deve realizar o teste do cálculo do fator de DI") void calculoFatorDiTest() { LocalDate dataInicial = LocalDate.of(2024, 1, 1); - LocalDate dataFinal = LocalDate.of(2024, 12, 1); + LocalDate dataFinal = LocalDate.of(2024, 6, 1); BigDecimal percentual = BigDecimal.TEN; BigDecimal valor = BigDecimal.TEN; CalculoDIResponse response = service.calculoFatorDi(dataInicial, dataFinal, percentual, valor); assertEquals("2024-01-01", response.getDataInicial()); - assertEquals("2024-12-01", response.getDataFinal()); + assertEquals("2024-06-01", response.getDataFinal()); assertEquals("10%", response.getPercentual()); - assertEquals(new BigDecimal("1.00755266"), response.getFator()); - assertEquals("0.70%", response.getTaxa()); + assertEquals(new BigDecimal("1.00430987"), response.getFator()); + assertEquals("0.40%", response.getTaxa()); assertEquals(new BigDecimal("10"), response.getValorBase()); - assertEquals(new BigDecimal("10.07"), response.getValorCalculado()); + assertEquals(new BigDecimal("10.04"), response.getValorCalculado()); } }