com.ubertob.pesticide.core.DdtActions.kt Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of pesticide-core Show documentation
Show all versions of pesticide-core Show documentation
A Library To Write Domain-Driven Tests
package com.ubertob.pesticide.core
/**
* DdtActions is the interface that contains all the possible actions on the domain.
* The domain specific interface must be implemented for each of the protocols.
*
* DdtActions should work as a Facade to abstract the specific protocol details,
* It should not contain domain related assertions, those should be used only inside the Steps.
* It can contain assertions related to technical layers of the specific protocols.
*
* see also {@link DdtProtocol} and {@link DdtActorWithContext}
*
*/
typealias DomainActions = DdtActions
interface DdtActions {
val protocol: P
fun prepare(): DomainSetUp
fun tearDown(): DdtActions = this
}
sealed class DomainSetUp
object Ready : DomainSetUp()
data class NotReady(val reason: String) : DomainSetUp()
© 2015 - 2025 Weber Informatics LLC | Privacy Policy