27
27
package io.spine.test.options.goes
28
28
29
29
import com.google.protobuf.Message
30
+ import io.spine.test.options.goes.given.newBuilder
31
+ import io.spine.test.options.goes.given.protoDescriptor
32
+ import io.spine.test.options.goes.given.protoValue
30
33
import io.spine.validate.ValidationException
31
34
import org.junit.jupiter.api.DisplayName
32
35
import org.junit.jupiter.api.assertDoesNotThrow
@@ -47,7 +50,7 @@ import org.junit.jupiter.params.provider.MethodSource
47
50
@DisplayName(" `(goes)` constraint should" )
48
51
internal class GoesOneWayITest {
49
52
50
- @MethodSource(" io.spine.test.options.goes.TestDataOneWay #onlyTargetFields" )
53
+ @MethodSource(" io.spine.test.options.goes.given.GoesOneWayTestEnv #onlyTargetFields" )
51
54
@ParameterizedTest(name = " throw if only the target `{1}` field is set" )
52
55
fun throwIfOnlyTargetFieldSet (message : Class <Message >, fieldName : String , fieldValue : Any ) {
53
56
val descriptor = message.protoDescriptor()
@@ -60,7 +63,7 @@ internal class GoesOneWayITest {
60
63
}
61
64
}
62
65
63
- @MethodSource(" io.spine.test.options.goes.TestDataOneWay #onlyCompanionFields" )
66
+ @MethodSource(" io.spine.test.options.goes.given.GoesOneWayTestEnv #onlyCompanionFields" )
64
67
@ParameterizedTest(name = " pass if only the companion `{1}` field is set" )
65
68
fun passIfOnlyCompanionFieldSet (
66
69
message : Class <out Message >,
@@ -78,7 +81,7 @@ internal class GoesOneWayITest {
78
81
}
79
82
80
83
@Suppress(" MaxLineLength" ) // So not to wrap the test name.
81
- @MethodSource(" io.spine.test.options.goes.TestDataOneWay #bothTargetAndCompanionFields" )
84
+ @MethodSource(" io.spine.test.options.goes.given.GoesOneWayTestEnv #bothTargetAndCompanionFields" )
82
85
@ParameterizedTest(name = " pass if both the target `{1}` and its companion `{3}` fields are set" )
83
86
fun passIfBothTargetAndCompanionFieldsSet (
84
87
message : Class <out Message >,
0 commit comments