add test provisionDesktop_fails_for_unknown_DesktopType

This commit is contained in:
az 2022-06-17 13:22:00 +02:00
parent 97779bccc3
commit 0659a98532

View file

@ -2,11 +2,32 @@ package org.domaindrivenarchitecture.provs.desktop.domain
import org.domaindrivenarchitecture.provs.desktop.infrastructure.getConfig
import org.domaindrivenarchitecture.provs.test.defaultTestContainer
import org.domaindrivenarchitecture.provs.test.tags.ContainerTest
import org.domaindrivenarchitecture.provs.test.tags.ExtensiveContainerTest
import org.junit.jupiter.api.Assertions.assertEquals
import org.junit.jupiter.api.Assertions.assertTrue
import org.junit.jupiter.api.assertThrows
internal class DesktopServiceKtTest {
@ContainerTest
fun provisionDesktop_fails_for_unknown_DesktopType() {
// given
val prov = defaultTestContainer()
// when
val exception = assertThrows<RuntimeException> {
prov.provisionDesktop(
DesktopType("iamunkown"),
gitUserName = "testuser",
gitEmail = "testuser@test.org",
)
}
// then
assertEquals("No DesktopType found for value: iamunkown", exception.message)
}
@ExtensiveContainerTest
fun provisionDesktop() {
// given