add test provisionDesktop_fails_for_unknown_DesktopType
This commit is contained in:
parent
97779bccc3
commit
0659a98532
1 changed files with 21 additions and 0 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue