feat: Added domain model builders and DSL#4
Conversation
sh1sh4k1n9
left a comment
There was a problem hiding this comment.
Как будто нужно еще вот эту штуку использовать. https://kotlinlang.org/docs/type-safe-builders.html#scope-control-dslmarker
У нас есть клэш по неймингу, так что нам актуально будто. Да и в целом для билдеров полезно
b376020 to
9525e78
Compare
987adb8 to
315534c
Compare
315534c to
8f5efaf
Compare
| @@ -0,0 +1,818 @@ | |||
| package tech.testsys.domain.builder.api | |||
Check warning
Code scanning / detekt
Too many functions inside a/an file/class/object/interface always indicate a violation of the single responsibility principle. Maybe the file/class/object/interface wants to manage too many things at once. Extract functionality which clearly belongs together. Warning test
| @@ -0,0 +1,818 @@ | |||
| package tech.testsys.domain.builder.api | |||
|
|
|||
| import tech.testsys.domain.builder.group.* | |||
Check warning
Code scanning / detekt
Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning test
| package tech.testsys.domain.builder.api | ||
|
|
||
| import tech.testsys.domain.builder.group.* | ||
| import tech.testsys.domain.builder.task.* |
Check warning
Code scanning / detekt
Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning test
|
|
||
| import tech.testsys.domain.builder.group.* | ||
| import tech.testsys.domain.builder.task.* | ||
| import tech.testsys.domain.builder.user.* |
Check warning
Code scanning / detekt
Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning test
| import tech.testsys.domain.builder.user.* | ||
| import tech.testsys.domain.builder.util.chooser.TaskDataChooser | ||
| import tech.testsys.domain.builder.util.lazify | ||
| import tech.testsys.domain.model.group.* |
Check warning
Code scanning / detekt
Wildcard imports should be replaced with imports using fully qualified class names. Wildcard imports can lead to naming conflicts. A library update can introduce naming clashes with your classes which results in compilation errors. Warning test
| contests(listOf(10L, 20L)) | ||
| }, | ||
| ) | ||
| } No newline at end of file |
Check warning
Code scanning / detekt
Checks whether files end with a line separator. Warning test
| import tech.testsys.domain.model.task.DeveloperSolution | ||
| import tech.testsys.domain.model.task.DeveloperSolutionData | ||
|
|
||
| class DeveloperSolutionBuilderTests : DomainEntityBuilderTests<DeveloperSolution, DeveloperSolutionData, DeveloperSolutionDataBuilder>( |
Check warning
Code scanning / detekt
Line detected, which is longer than the defined maximum line length in the code style. Warning test
| task(1) | ||
| submission(1) | ||
| }) | ||
| } No newline at end of file |
Check warning
Code scanning / detekt
Checks whether files end with a line separator. Warning test
| import tech.testsys.domain.model.user.MultipleRoleUser | ||
| import tech.testsys.domain.model.user.MultipleRoleUserData | ||
|
|
||
| class MultipleRoleUserBuilderTests : DomainEntityBuilderTests<MultipleRoleUser, MultipleRoleUserData, MultipleRoleUserDataBuilder>( |
Check warning
Code scanning / detekt
Line detected, which is longer than the defined maximum line length in the code style. Warning test
| MultipleRoleUserBuilder(), | ||
| MultipleRoleUserDataBuilder() | ||
| ) { | ||
| override fun buildDataWithAllFields() = listOf( |
Check warning
Code scanning / detekt
One method should have one responsibility. Long methods tend to handle many things at once. Prefer smaller methods to make them easier to understand. Warning test
No description provided.