Skip to content
This repository was archived by the owner on Mar 31, 2025. It is now read-only.

Commit 002e0a7

Browse files
committed
not all static
1 parent a926f7e commit 002e0a7

1 file changed

Lines changed: 31 additions & 31 deletions

File tree

src/itest/java/com/sybit/airtable/mock/WireMockBaseTest.java

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -29,101 +29,101 @@
2929
*/
3030
public class WireMockBaseTest {
3131

32-
private static class WiremockProp {
32+
private class WiremockProp {
3333

34-
private static boolean recording;
34+
private boolean recording;
3535

36-
private static boolean cleanDirectorys;
36+
private boolean cleanDirectorys;
3737

38-
private static String targetUrl;
38+
private String targetUrl;
3939

40-
private static String proxyBase;
40+
private String proxyBase;
4141

42-
private static int proxyPort;
42+
private int proxyPort;
4343

44-
private static int serverPort;
44+
private int serverPort;
4545

4646
/**
4747
* @return the recording
4848
*/
49-
public static boolean isRecording() {
49+
public boolean isRecording() {
5050
return recording;
5151
}
5252

5353
/**
5454
* @param aRecording the recording to set
5555
*/
56-
public static void setRecording(boolean aRecording) {
56+
public void setRecording(boolean aRecording) {
5757
recording = aRecording;
5858
}
5959

6060
/**
6161
* @return the cleanDirectorys
6262
*/
63-
public static boolean isCleanDirectorys() {
63+
public boolean isCleanDirectorys() {
6464
return cleanDirectorys;
6565
}
6666

6767
/**
6868
* @param aCleanDirectorys the cleanDirectorys to set
6969
*/
70-
public static void setCleanDirectorys(boolean aCleanDirectorys) {
70+
public void setCleanDirectorys(boolean aCleanDirectorys) {
7171
cleanDirectorys = aCleanDirectorys;
7272
}
7373

7474
/**
7575
* @return the targetUrl
7676
*/
77-
public static String getTargetUrl() {
77+
public String getTargetUrl() {
7878
return targetUrl;
7979
}
8080

8181
/**
8282
* @param aTargetUrl the targetUrl to set
8383
*/
84-
public static void setTargetUrl(String aTargetUrl) {
84+
public void setTargetUrl(String aTargetUrl) {
8585
targetUrl = aTargetUrl;
8686
}
8787

8888
/**
8989
* @return the proxyBase
9090
*/
91-
public static String getProxyBase() {
91+
public String getProxyBase() {
9292
return proxyBase;
9393
}
9494

9595
/**
9696
* @param aProxyBase the proxyBase to set
9797
*/
98-
public static void setProxyBase(String aProxyBase) {
98+
public void setProxyBase(String aProxyBase) {
9999
proxyBase = aProxyBase;
100100
}
101101

102102
/**
103103
* @return the proxyPort
104104
*/
105-
public static int getProxyPort() {
105+
public int getProxyPort() {
106106
return proxyPort;
107107
}
108108

109109
/**
110110
* @param aProxyPort the proxyPort to set
111111
*/
112-
public static void setProxyPort(int aProxyPort) {
112+
public void setProxyPort(int aProxyPort) {
113113
proxyPort = aProxyPort;
114114
}
115115

116116
/**
117117
* @return the serverPort
118118
*/
119-
public static int getServerPort() {
119+
public int getServerPort() {
120120
return serverPort;
121121
}
122122

123123
/**
124124
* @param aServerPort the serverPort to set
125125
*/
126-
public static void setServerPort(int aServerPort) {
126+
public void setServerPort(int aServerPort) {
127127
serverPort = aServerPort;
128128
}
129129
};
@@ -142,26 +142,26 @@ public void setUp() throws AirtableException {
142142
airtable.setEndpointUrl("http://localhost:8080");
143143
base = airtable.base("appTtHA5PfJnVfjdu");
144144

145-
WiremockProp.setRecording(false);
146-
WiremockProp.setCleanDirectorys(false);
147-
WiremockProp.setProxyBase("192.168.1.254");
148-
WiremockProp.setProxyPort(8080);
149-
WiremockProp.setServerPort(8080);
150-
WiremockProp.setTargetUrl("https://api.airtable.com/v0");
151-
152-
if (WiremockProp.getProxyBase() != null && WiremockProp.getProxyPort() != 0) {
153-
wireMockServer = new WireMockServer(WireMockConfiguration.wireMockConfig().port(WiremockProp.getServerPort()).proxyVia(WiremockProp.getProxyBase(), WiremockProp.getProxyPort()));
145+
prop.setRecording(false);
146+
prop.setCleanDirectorys(false);
147+
prop.setProxyBase("192.168.1.254");
148+
prop.setProxyPort(8080);
149+
prop.setServerPort(8080);
150+
prop.setTargetUrl("https://api.airtable.com/v0");
151+
152+
if (prop.getProxyBase() != null && prop.getProxyPort() != 0) {
153+
wireMockServer = new WireMockServer(WireMockConfiguration.wireMockConfig().port(prop.getServerPort()).proxyVia(prop.getProxyBase(), prop.getProxyPort()));
154154
} else {
155-
wireMockServer = new WireMockServer(WireMockConfiguration.wireMockConfig().port(WiremockProp.getServerPort()));
155+
wireMockServer = new WireMockServer(WireMockConfiguration.wireMockConfig().port(prop.getServerPort()));
156156
}
157157

158158
//start the Wiremock-Server
159159
startServer();
160160

161161
//check if record
162-
if (WiremockProp.isRecording()) {
162+
if (prop.isRecording()) {
163163
//check if cleanDirectorys
164-
if (WiremockProp.isCleanDirectorys()) {
164+
if (prop.isCleanDirectorys()) {
165165
cleanExistingRecords();
166166
startRecording();
167167
} else {

0 commit comments

Comments
 (0)