Skip to content

Commit

Permalink
Fjernre Jakarta EL gammel versjon (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
jolarsen authored Apr 12, 2024
1 parent f1c4a9f commit 3054701
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 43 deletions.
5 changes: 0 additions & 5 deletions kalkulator/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,6 @@
<artifactId>fpsak-tidsserie</artifactId>
</dependency>

<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down
10 changes: 0 additions & 10 deletions kontrakt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,6 @@
<groupId>jakarta.validation</groupId>
<artifactId>jakarta.validation-api</artifactId>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<scope>test</scope>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,25 +1,10 @@
package no.nav.folketrygdloven.kalkulus.mappers;

import static org.assertj.core.api.Assertions.assertThat;

import jakarta.validation.Validation;

import org.assertj.core.api.Assertions;

import com.fasterxml.jackson.databind.ObjectReader;
import com.fasterxml.jackson.databind.ObjectWriter;

public class JsonMapperUtil {

public static final ObjectWriter WRITER_JSON = JsonMapper.getMapper().writerWithDefaultPrettyPrinter();
public static final ObjectReader READER_JSON = JsonMapper.getMapper().reader();

public static void validateResult(Object roundTripped) {
Assertions.assertThat(roundTripped).isNotNull();
try (var factory = Validation.buildDefaultValidatorFactory()) {
var validator = factory.getValidator();
var violations = validator.validate(roundTripped);
assertThat(violations).isEmpty();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

import static no.nav.folketrygdloven.kalkulus.mappers.JsonMapperUtil.READER_JSON;
import static no.nav.folketrygdloven.kalkulus.mappers.JsonMapperUtil.WRITER_JSON;
import static no.nav.folketrygdloven.kalkulus.mappers.JsonMapperUtil.validateResult;
import static org.assertj.core.api.Assertions.assertThat;

import java.math.BigDecimal;
Expand Down Expand Up @@ -74,7 +73,6 @@ void skal_generere_og_validere_roundtrip_kalkulator_input_json() throws Exceptio

assertThat(roundTripped).isNotNull();
assertThat(roundTripped.getIayGrunnlag()).isNotNull();
validateResult(roundTripped);
}


Expand All @@ -99,7 +97,6 @@ void skal_generere_og_validere_roundtrip_av_start_beregning_request() throws Exc
assertThat(roundTripped.getAktør()).isEqualTo(dummy);
assertThat(roundTripped.getSaksnummer()).isEqualTo(saksnummer);
assertThat(roundTripped.getBeregnForListe().getFirst().getEksternReferanse()).isEqualTo(enUuid);
validateResult(roundTripped);
}

private KalkulatorInputDto byggKalkulatorInput() {
Expand Down
10 changes: 0 additions & 10 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -80,16 +80,6 @@
<artifactId>jakarta.validation-api</artifactId>
<version>3.0.2</version>
</dependency>
<dependency>
<groupId>org.hibernate.validator</groupId>
<artifactId>hibernate-validator</artifactId>
<version>8.0.1.Final</version>
</dependency>
<dependency>
<groupId>org.glassfish</groupId>
<artifactId>jakarta.el</artifactId>
<version>4.0.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
Expand Down

0 comments on commit 3054701

Please sign in to comment.