-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
TB-91 Endringer i applikasjonsarkitektur
- Loading branch information
Showing
79 changed files
with
589 additions
and
410 deletions.
There are no files selected for viewing
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
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,49 @@ | ||
import org.gradle.api.tasks.testing.logging.TestExceptionFormat | ||
import org.gradle.api.tasks.testing.logging.TestLogEvent.FAILED | ||
import org.gradle.api.tasks.testing.logging.TestLogEvent.PASSED | ||
import org.gradle.api.tasks.testing.logging.TestLogEvent.SKIPPED | ||
|
||
plugins { | ||
kotlin("jvm") | ||
kotlin("plugin.serialization").version(libs.versions.kotlinVersion) | ||
|
||
`jvm-test-suite` | ||
} | ||
|
||
dependencies { | ||
// Error handling | ||
api(libs.kotlin.result) | ||
|
||
// Serialization | ||
// TODO: Bør helst ikke måtte ligge i application (skyldes lagring i databasen) | ||
implementation(libs.ktor.serialization.kotlinx) | ||
|
||
// Norwegian Commons | ||
implementation(libs.norwegian.commons) | ||
} | ||
|
||
tasks.withType<Test> { | ||
testLogging { | ||
showCauses = true | ||
showExceptions = true | ||
exceptionFormat = TestExceptionFormat.FULL | ||
events(PASSED, SKIPPED, FAILED) | ||
} | ||
} | ||
|
||
@Suppress("UnstableApiUsage") | ||
testing { | ||
suites { | ||
withType<JvmTestSuite> { | ||
useJUnitJupiter() | ||
} | ||
|
||
named<JvmTestSuite>("test") { | ||
dependencies { | ||
implementation(libs.kotlin.test) | ||
implementation(libs.assertk) | ||
implementation(libs.mockk) | ||
} | ||
} | ||
} | ||
} |
6 changes: 3 additions & 3 deletions
6
...rikkel/bygning/matrikkel/BygningClient.kt → ...ning/application/bygning/BygningClient.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
13 changes: 7 additions & 6 deletions
13
...rikkel/bygning/services/BygningService.kt → ...ing/application/bygning/BygningService.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
10 changes: 10 additions & 0 deletions
10
...o/kartverket/matrikkel/bygning/application/egenregistrering/EgenregistreringRepository.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,10 @@ | ||
package no.kartverket.matrikkel.bygning.application.egenregistrering | ||
|
||
import com.github.michaelbull.result.Result | ||
import no.kartverket.matrikkel.bygning.application.models.Egenregistrering | ||
import no.kartverket.matrikkel.bygning.application.models.error.ErrorDetail | ||
|
||
interface EgenregistreringRepository { | ||
fun getAllEgenregistreringerForBygning(bygningId: Long): Result<List<Egenregistrering>, ErrorDetail> | ||
fun saveEgenregistrering(egenregistrering: Egenregistrering): Result<Unit, ErrorDetail> | ||
} |
9 changes: 4 additions & 5 deletions
9
...gning/services/EgenregistreringService.kt → ...enregistrering/EgenregistreringService.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
9 changes: 5 additions & 4 deletions
9
...ing/services/EgenregistreringValidator.kt → ...registrering/EgenregistreringValidator.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
5 changes: 5 additions & 0 deletions
5
...on/src/main/kotlin/no/kartverket/matrikkel/bygning/application/health/HealthRepository.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,5 @@ | ||
package no.kartverket.matrikkel.bygning.application.health | ||
|
||
interface HealthRepository { | ||
fun isHealthy(): Boolean | ||
} |
7 changes: 7 additions & 0 deletions
7
...ation/src/main/kotlin/no/kartverket/matrikkel/bygning/application/health/HealthService.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,7 @@ | ||
package no.kartverket.matrikkel.bygning.application.health | ||
|
||
class HealthService(private val healthRepository: HealthRepository) { | ||
fun isHealthy(): Boolean { | ||
return healthRepository.isHealthy() | ||
} | ||
} |
10 changes: 5 additions & 5 deletions
10
...erket/matrikkel/bygning/models/Bygning.kt → ...kel/bygning/application/models/Bygning.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
2 changes: 1 addition & 1 deletion
2
...ikkel/bygning/models/BygningExtensions.kt → ...g/application/models/BygningExtensions.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
12 changes: 6 additions & 6 deletions
12
...rikkel/bygning/models/Egenregistrering.kt → ...ng/application/models/Egenregistrering.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
2 changes: 1 addition & 1 deletion
2
...kkel/bygning/models/RegistreringAktoer.kt → .../application/models/RegistreringAktoer.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
6 changes: 6 additions & 0 deletions
6
...n/src/main/kotlin/no/kartverket/matrikkel/bygning/application/models/error/ErrorDetail.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,6 @@ | ||
package no.kartverket.matrikkel.bygning.application.models.error | ||
|
||
data class ErrorDetail( | ||
val pointer: String? = null, | ||
val detail: String | ||
) |
2 changes: 1 addition & 1 deletion
2
...odels/kodelister/EgenregistreringKoder.kt → ...odels/kodelister/EgenregistreringKoder.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
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
3 changes: 2 additions & 1 deletion
3
...ikkel/bygning/models/MultikildeAsserts.kt → .../bygning/application/MultikildeAsserts.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
4 changes: 2 additions & 2 deletions
4
.../bygning/models/RegistreringAktoerTest.kt → ...ing/application/RegistreringAktoerTest.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
14 changes: 7 additions & 7 deletions
14
...services/EgenregistreringValidatorTest.kt → ...strering/EgenregistreringValidatorTest.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
Oops, something went wrong.