File tree 1 file changed +1
-3
lines changed
provider/pact-jvm-provider-junit/src/main/kotlin/au/com/dius/pact/provider/junit
1 file changed +1
-3
lines changed Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ import org.junit.runner.Description
26
26
import org.junit.runner.Runner
27
27
import org.junit.runner.notification.Failure
28
28
import org.junit.runner.notification.RunNotifier
29
- import org.junit.runners.model.FrameworkField
30
29
import org.junit.runners.model.FrameworkMethod
31
30
import org.junit.runners.model.InitializationError
32
31
import org.junit.runners.model.Statement
@@ -117,15 +116,14 @@ open class InteractionRunner<I>(
117
116
118
117
protected fun hasOneConstructor () = testClass.javaClass.constructors.size == 1
119
118
120
- protected fun validateTestTarget (errors : MutableList <Throwable >): FrameworkField {
119
+ protected fun validateTestTarget (errors : MutableList <Throwable >) {
121
120
val annotatedFields = testClass.getAnnotatedFields(TestTarget ::class .java)
122
121
if (annotatedFields.size != 1 ) {
123
122
errors.add(Exception (" Test class should have exactly one field annotated with ${TestTarget ::class .java.name} " ))
124
123
} else if (! Target ::class .java.isAssignableFrom(annotatedFields[0 ].type)) {
125
124
errors.add(Exception (" Field annotated with ${TestTarget ::class .java.name} should implement " +
126
125
" ${Target ::class .java.name} interface" ))
127
126
}
128
- return annotatedFields[0 ]
129
127
}
130
128
131
129
protected fun validateRules (errors : List <Throwable >) {
You can’t perform that action at this time.
0 commit comments