|
24 | 24 | /** |
25 | 25 | * Base Class to test using WireMock. |
26 | 26 | * |
27 | | - * Config files for the requests are stored at |
28 | | - * 'src/test/resources/__files' and 'src/test/resources/mappings'. |
| 27 | + * Config files for the requests are stored at 'src/test/resources/__files' and |
| 28 | + * 'src/test/resources/mappings'. |
29 | 29 | */ |
30 | 30 | public class WireMockBaseTest { |
31 | 31 |
|
| 32 | + private static WireMockServer wireMockServer; |
| 33 | + private static WiremockProp prop; |
| 34 | + |
| 35 | + protected static Airtable airtable = new Airtable(); |
| 36 | + protected static Base base; |
| 37 | + |
32 | 38 | private class WiremockProp { |
33 | 39 |
|
34 | 40 | private boolean recording; |
@@ -128,20 +134,15 @@ public void setServerPort(int aServerPort) { |
128 | 134 | } |
129 | 135 | }; |
130 | 136 |
|
131 | | - private static WireMockServer wireMockServer; |
132 | | - private static WiremockProp prop; |
133 | | - |
134 | | - protected static Airtable airtable = new Airtable(); |
135 | | - protected static Base base; |
136 | | - |
137 | 137 | @Before |
138 | 138 | public void setUp() throws AirtableException { |
139 | | - |
| 139 | + |
140 | 140 | airtable.configure(); |
141 | 141 | airtable.setProxy("127.0.0.1"); |
142 | 142 | airtable.setEndpointUrl("http://localhost:8080"); |
143 | 143 | base = airtable.base("appTtHA5PfJnVfjdu"); |
144 | | - |
| 144 | + |
| 145 | + prop = new WiremockProp(); |
145 | 146 | prop.setRecording(false); |
146 | 147 | prop.setCleanDirectorys(false); |
147 | 148 | prop.setProxyBase("192.168.1.254"); |
@@ -223,4 +224,3 @@ public static void cleanExistingRecords() { |
223 | 224 | } |
224 | 225 |
|
225 | 226 | } |
226 | | - |
0 commit comments