Skip to content

Commit

Permalink
CODE: Fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Vicjun22 committed Oct 12, 2024
1 parent cb77ec1 commit 23f950f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 28 deletions.
23 changes: 0 additions & 23 deletions api/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -87,29 +87,6 @@
</configuration>
</plugin>

<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
<version>7.8.0</version>
<executions>
<execution>
<id>contract.yml</id>
<goals>
<goal>generate</goal>
</goals>
<configuration>
<skipValidateSpec>true</skipValidateSpec>
<inputSpec>./src/main/resources/swagger/contract.yml</inputSpec>
<generatorName>spring</generatorName>
<configOptions>
<openApiNullable>false</openApiNullable>
<interfaceOnly>true</interfaceOnly>
<useJakartaEe>true</useJakartaEe>
</configOptions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.openapitools</groupId>
<artifactId>openapi-generator-maven-plugin</artifactId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
}

0 comments on commit 23f950f

Please sign in to comment.