Split Entities for remove nullable variables

This commit is contained in:
2020-01-28 11:08:43 +01:00
parent 3cdd1f3a46
commit 813d6857e9
52 changed files with 569 additions and 287 deletions

View File

@@ -1,6 +1,6 @@
package feature
import fr.dcproject.entity.Citizen
import fr.dcproject.entity.*
import fr.dcproject.repository.CommentArticle
import io.cucumber.java8.En
import org.joda.time.DateTime
@@ -18,7 +18,7 @@ class ArticleSteps : En, KoinTest {
init {
Given("I have article with id {string}") { id: String ->
var citizen = Citizen(
name = Citizen.Name("John", "Doe"),
name = CitizenI.Name("John", "Doe"),
email = "john.doe@gmail.com",
birthday = DateTime.now(),
user = UserEntity(username = "john-doe", plainPassword = "azerty")
@@ -55,7 +55,7 @@ class ArticleSteps : En, KoinTest {
Given("I have comment {string} on article {string}") { commentId: String, articleId: String ->
var citizen = Citizen(
name = Citizen.Name("John", "Doe"),
name = CitizenI.Name("John", "Doe"),
email = "john.doe@gmail.com",
birthday = DateTime.now(),
user = UserEntity(username = "john-doe", plainPassword = "azerty")
@@ -76,7 +76,7 @@ class ArticleSteps : En, KoinTest {
)
get<ArticleRepository>().upsert(article)
val comment = CommentEntity(
val comment: CommentEntity<ArticleRef> = CommentEntity(
id = UUID.fromString(commentId),
createdBy = citizen,
target = article,