Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nær relasjon fiks tester #9

Merged
merged 7 commits into from
Feb 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Test

on: [pull_request]

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v1
with:
java-version: '11.x'
- name: test and build
run: ./gradlew -Pversion="1.$(echo $GITHUB_SHA | cut -c1-7)" build test
10 changes: 9 additions & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ group = "no.nav.sykepenger.kontrakter"
version = "${dateFormat.format(Date())}-$gitHash"

plugins {
kotlin("jvm") version "1.3.50"
kotlin("jvm") version "1.5.30"
java
id("maven-publish")
}
Expand Down Expand Up @@ -74,4 +74,12 @@ configure<PublishingExtension> {
from(components["java"])
}
}
}

tasks.named<Test>("test") {
include("no/nav/inntektsmelding/**")
}

tasks.test {
useJUnitPlatform()
}
5 changes: 2 additions & 3 deletions gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
#Wed Aug 21 09:00:38 CEST 2019
distributionUrl=https\://services.gradle.org/distributions/gradle-5.2.1-all.zip
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStorePath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-7.4-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,13 @@ import org.junit.jupiter.api.Test
import java.math.BigDecimal
import java.time.LocalDate

internal class JacksonJsonConfigTest {
class JacksonJsonConfigTest {

val objectMapper: ObjectMapper = JacksonJsonConfig.opprettObjectMapper()

companion object {
private val foersteJanuar = LocalDate.of(2019,1,1)
private val andreJanuar = LocalDate.of(2019,1,1)
private val andreJanuar = LocalDate.of(2019,1,2)
}

@Test
Expand All @@ -38,7 +38,8 @@ internal class JacksonJsonConfigTest {
arkivreferanse = "AR123",
ferieperioder = emptyList(),
mottattDato = foersteJanuar.atStartOfDay(),
foersteFravaersdag = foersteJanuar
foersteFravaersdag = foersteJanuar,
naerRelasjon = true
)

val serialisertInntektsmelding = objectMapper.writeValueAsString(inntektsmelding)
Expand Down Expand Up @@ -89,7 +90,8 @@ internal class JacksonJsonConfigTest {
)
),
mottattDato = foersteJanuar.atStartOfDay(),
foersteFravaersdag = foersteJanuar
foersteFravaersdag = foersteJanuar,
naerRelasjon = true
)

val serialisertInntektsmelding = objectMapper.writeValueAsString(inntektsmelding)
Expand Down