|
28 | 28 | import io.cucumber.stepexpression.TypeRegistry;
|
29 | 29 | import org.junit.Rule;
|
30 | 30 | import org.junit.Test;
|
31 |
| -import org.junit.internal.matchers.ThrowableMessageMatcher; |
32 | 31 | import org.junit.rules.ExpectedException;
|
33 | 32 | import org.mockito.ArgumentCaptor;
|
34 | 33 | import org.mockito.ArgumentMatchers;
|
35 | 34 |
|
36 | 35 | import java.net.URI;
|
37 | 36 | import java.util.*;
|
38 |
| -import java.util.concurrent.TimeUnit; |
39 | 37 | import java.util.concurrent.atomic.AtomicBoolean;
|
40 | 38 |
|
41 | 39 | import static cucumber.runner.TestHelper.feature;
|
|
46 | 44 | import static java.util.concurrent.TimeUnit.SECONDS;
|
47 | 45 | import static org.hamcrest.Matchers.equalTo;
|
48 | 46 | import static org.junit.Assert.*;
|
49 |
| -import static org.junit.internal.matchers.ThrowableMessageMatcher.hasMessage; |
50 | 47 | import static org.mockito.ArgumentMatchers.any;
|
51 | 48 | import static org.mockito.ArgumentMatchers.eq;
|
52 | 49 | import static org.mockito.Mockito.mock;
|
@@ -75,10 +72,10 @@ public void runs_feature_with_json_formatter() {
|
75 | 72 |
|
76 | 73 | Plugin jsonFormatter = FormatterBuilder.jsonFormatter(out);
|
77 | 74 | ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
|
78 |
| - BackendSupplier backendSupplier = new BackendSupplier() { |
| 75 | + BackendSupplier backendSupplier = new TestBackendSupplier() { |
79 | 76 | @Override
|
80 |
| - public Collection<? extends Backend> get() { |
81 |
| - return singletonList(mock(Backend.class)); |
| 77 | + public void loadGlue(Glue glue, List<URI> gluePaths) { |
| 78 | + |
82 | 79 | }
|
83 | 80 | };
|
84 | 81 | FeatureSupplier featureSupplier = new FeatureSupplier() {
|
@@ -663,11 +660,10 @@ private Runtime createRuntime(String... runtimeArgs) {
|
663 | 660 | }
|
664 | 661 |
|
665 | 662 | private Runtime createRuntime(ResourceLoader resourceLoader, ClassLoader classLoader, String... runtimeArgs) {
|
666 |
| - BackendSupplier backendSupplier = new BackendSupplier() { |
| 663 | + BackendSupplier backendSupplier = new TestBackendSupplier(){ |
667 | 664 | @Override
|
668 |
| - public Collection<? extends Backend> get() { |
669 |
| - Backend backend = mock(Backend.class); |
670 |
| - return singletonList(backend); |
| 665 | + public void loadGlue(Glue glue, List<URI> gluePaths) { |
| 666 | + |
671 | 667 | }
|
672 | 668 | };
|
673 | 669 |
|
@@ -799,7 +795,7 @@ public Integer getParameterCount() {
|
799 | 795 | }
|
800 | 796 |
|
801 | 797 | @Override
|
802 |
| - public void execute(Object[] args) throws Throwable { |
| 798 | + public void execute(Object[] args) { |
803 | 799 |
|
804 | 800 | }
|
805 | 801 |
|
|
0 commit comments