File tree Expand file tree Collapse file tree
backend/data/src/test/kotlin/io/tolgee/unit Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11package io.tolgee.unit
22
33import io.tolgee.component.FrontendUrlProvider
4- import io.tolgee.model.Language
4+ import io.tolgee.development.testDataBuilder.data.TaskTestData
55import io.tolgee.model.notifications.Notification
6- import io.tolgee.model.notifications.NotificationType
7- import io.tolgee.model.task.Task
86import io.tolgee.service.notification.TaskEmailComposer
97import io.tolgee.testing.assert
108import io.tolgee.util.I18n
@@ -40,16 +38,12 @@ class TaskEmailComposerTest {
4038 taskName : String = "Translate ",
4139 languageName : String = "English ",
4240 ): Notification {
43- val task =
44- Task ().apply {
45- this .name = taskName
46- this .number = 1L
47- this .language = Language ().apply { this .name = languageName }
48- }
49-
50- return Notification ().apply {
51- this .type = NotificationType .TASK_ASSIGNED
52- this .linkedTask = task
41+ val testData = TaskTestData ()
42+ testData.addNotifications()
43+ testData.translateTask.self.apply {
44+ name = taskName
45+ language.name = languageName
5346 }
47+ return testData.taskNotification.self
5448 }
5549}
You can’t perform that action at this time.
0 commit comments