-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix positions parsing when network type vary
- Loading branch information
1 parent
c363ce1
commit ebbf4d6
Showing
3 changed files
with
44 additions
and
6 deletions.
There are no files selected for viewing
19 changes: 13 additions & 6 deletions
19
backend/src/main/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/position/NetworkType.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
19 changes: 19 additions & 0 deletions
19
...nd/src/test/kotlin/fr/gouv/cnsp/monitorfish/domain/entities/position/NetworkTypeUTests.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package fr.gouv.cnsp.monitorfish.domain.entities.position | ||
|
||
import org.assertj.core.api.Assertions.assertThat | ||
import org.junit.jupiter.api.Test | ||
import org.junit.jupiter.api.extension.ExtendWith | ||
import org.springframework.test.context.junit.jupiter.SpringExtension | ||
|
||
@ExtendWith(SpringExtension::class) | ||
class CountryCodeUTests { | ||
|
||
@Test | ||
fun `from Should return null if not found`() { | ||
// When | ||
val result = NetworkType.from("INCORRECT") | ||
|
||
// Then | ||
assertThat(result).isNull() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters