Skip to content

Commit

Permalink
BEdre med gradle check som faktisk tester om ting er feil eller ei
Browse files Browse the repository at this point in the history
  • Loading branch information
sebassonav committed Nov 13, 2024
1 parent ca049b9 commit 844fa9f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@

import no.nav.etterlatte.beregning.grunnlag.Prosent
import no.nav.etterlatte.libs.common.feilhaandtering.InternfeilException
import org.junit.jupiter.api.Assertions
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
Expand All @@ -17,11 +18,11 @@ class ProsentTest {

@Test
fun `stoetter ikke negativ prosent`() {
assertThrows<IllegalArgumentException> { Prosent(-1) }
assertThrows<InternfeilException> { Prosent(-1) }
}

@Test
fun `stoetter ikke prosent over 100`() {
assertThrows<IllegalArgumentException> { Prosent(101) }
assertThrows<InternfeilException> { Prosent(101) }
}
}

0 comments on commit 844fa9f

Please sign in to comment.