Refactoring Opinion Tests

upsert_opinion_choice
This commit is contained in:
2020-03-17 00:31:24 +01:00
parent 6b4a6f4075
commit 8c7e5bdf9b
9 changed files with 129 additions and 67 deletions

View File

@@ -8,7 +8,7 @@ import fr.postgresjson.entity.mutable.EntityDeletedAtImp
import java.util.*
class OpinionChoice(
id: UUID,
id: UUID? = null,
val name: String,
val target: List<String>?
) : OpinionChoiceRef(id),
@@ -16,5 +16,5 @@ class OpinionChoice(
EntityDeletedAt by EntityDeletedAtImp()
open class OpinionChoiceRef(
id: UUID
) : UuidEntity(id)
id: UUID?
) : UuidEntity(id ?: UUID.randomUUID())