Skip to content

Commit 7da8ead

Browse files
author
yevhenii-nadtochii
committed
Fix Detekt warnings
1 parent 065dbae commit 7da8ead

File tree

4 files changed

+9
-20
lines changed

4 files changed

+9
-20
lines changed

java-tests/runtime/src/test/kotlin/io/spine/validate/ValidationOfConstraintTest.kt

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -62,21 +62,10 @@ abstract class ValidationOfConstraintTest {
6262
}
6363
}
6464

65-
/**
66-
* Asserts that calling the `build()` method of the passed builder throws `ValidationException`.
67-
*/
68-
private fun assertDoesNotBuild(builder: Message.Builder) {
69-
assertThrows<ValidationException> {
70-
builder.build()
71-
}
72-
}
73-
7465
/**
7566
* Asserts that the creation of the message fails when the [setup] function is invoked.
7667
*
7768
* The most common use case is when the message is created via a Kotlin DSL block.
78-
*
79-
* @see assertDoesNotBuild
8069
*/
8170
protected fun assertDoesNotBuild(setup: () -> Message) {
8271
assertThrows<ValidationException> {

java-tests/validating/src/test/kotlin/io/spine/test/options/setonce/SetOnceErrorMessageITest.kt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,4 +132,5 @@ private const val DEFAULT_MESSAGE_FORMAT =
132132
"the value `\${field.value}` and cannot be reassigned to `\${field.proposed_value}`."
133133

134134
private fun customMessageFormat(fieldNumber: Int) =
135-
"Field_$fieldNumber: `\${field.value}`, `\${field.name}`, `\${field.proposed_value}`, `\${field.type}`."
135+
"Field_$fieldNumber: " +
136+
"`\${field.value}`, `\${field.name}`, `\${field.proposed_value}`, `\${field.type}`."

java-tests/validating/src/testFixtures/kotlin/io/spine/validation/assertions/Assertions.kt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import io.kotest.matchers.string.shouldContain
3737
import io.spine.type.toJson
3838
import io.spine.validate.ConstraintViolation
3939
import io.spine.validate.ValidationException
40-
import io.spine.validate.text.format
4140
import org.junit.jupiter.api.Assertions.assertDoesNotThrow
4241
import org.junit.jupiter.api.Assertions.assertThrows
4342
import org.junit.jupiter.api.Assertions.fail
@@ -90,7 +89,7 @@ fun assertViolation(
9089
.contains(field)
9190

9291
val violation = violations.atField(field)
93-
violation.message.format() shouldContain errorMessagePart
92+
violation.message.withPlaceholders shouldContain errorMessagePart
9493
}
9594

9695
/**

pom.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,13 +74,13 @@ all modules and does not describe the project structure per-subproject.
7474
<dependency>
7575
<groupId>io.spine.protodata</groupId>
7676
<artifactId>protodata-backend</artifactId>
77-
<version>0.80.3</version>
77+
<version>0.80.4</version>
7878
<scope>compile</scope>
7979
</dependency>
8080
<dependency>
8181
<groupId>io.spine.protodata</groupId>
8282
<artifactId>protodata-java</artifactId>
83-
<version>0.80.3</version>
83+
<version>0.80.4</version>
8484
<scope>compile</scope>
8585
</dependency>
8686
<dependency>
@@ -134,13 +134,13 @@ all modules and does not describe the project structure per-subproject.
134134
<dependency>
135135
<groupId>io.spine.protodata</groupId>
136136
<artifactId>protodata-api</artifactId>
137-
<version>0.80.3</version>
137+
<version>0.80.4</version>
138138
<scope>test</scope>
139139
</dependency>
140140
<dependency>
141141
<groupId>io.spine.protodata</groupId>
142142
<artifactId>protodata-testlib</artifactId>
143-
<version>0.80.3</version>
143+
<version>0.80.4</version>
144144
<scope>test</scope>
145145
</dependency>
146146
<dependency>
@@ -239,12 +239,12 @@ all modules and does not describe the project structure per-subproject.
239239
<dependency>
240240
<groupId>io.spine.protodata</groupId>
241241
<artifactId>protodata-fat-cli</artifactId>
242-
<version>0.80.3</version>
242+
<version>0.80.4</version>
243243
</dependency>
244244
<dependency>
245245
<groupId>io.spine.protodata</groupId>
246246
<artifactId>protodata-protoc</artifactId>
247-
<version>0.80.3</version>
247+
<version>0.80.4</version>
248248
</dependency>
249249
<dependency>
250250
<groupId>io.spine.tools</groupId>

0 commit comments

Comments
 (0)