[skip ci] mv Config file tests to config test package

This commit is contained in:
erik 2022-11-30 10:25:54 +01:00
parent 546f2faf3a
commit c9b3c2a1eb
3 changed files with 4 additions and 5 deletions

View file

@ -2,4 +2,4 @@ package org.domaindrivenarchitecture.provs.configuration.domain
interface ConfigFileRepository {
fun assertExists(configFileName: ConfigFileName?)
}
}

View file

@ -5,7 +5,6 @@ import org.domaindrivenarchitecture.provs.configuration.domain.ConfigFileName
import org.domaindrivenarchitecture.provs.configuration.domain.ConfigFileRepository
class DefaultConfigFileRepository : ConfigFileRepository {
override fun assertExists(configFileName: ConfigFileName?) {
if (configFileName != null && !checkLocalFile(configFileName.fullqualified())) {
throw RuntimeException("Config file ${configFileName.fileName} not found. Please check if path is correct.")

View file

@ -1,14 +1,14 @@
package org.domaindrivenarchitecture.provs.server.infrastructure
package org.domaindrivenarchitecture.provs.configuration.infrastructure
import org.domaindrivenarchitecture.provs.server.domain.k3s.ApplicationFileName
import org.domaindrivenarchitecture.provs.server.domain.k3s.ApplicationFileRepository
import org.domaindrivenarchitecture.provs.server.infrastructure.DefaultApplicationFileRepository
import org.junit.jupiter.api.Test
import org.junit.jupiter.api.assertThrows
import org.junit.jupiter.api.Assertions.assertEquals
import java.io.File
internal class DefaultConfigFileRepositoryKtTest {
@Test
fun assertExistsThrowsRuntimeException() {
// when
@ -38,4 +38,4 @@ internal class DefaultConfigFileRepositoryKtTest {
// then
// no exception is thrown
}
}
}