Skip to content

Commit 0ecf8be

Browse files
committed
Deprecate the remaining withMapping()
1 parent a42fc0b commit 0ecf8be

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

src/main/java/org/wiremock/integrations/testcontainers/WireMockContainer.java

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public WireMockContainer withCliArg(String arg) {
129129
* @return This instance
130130
*/
131131
public WireMockContainer withMappingFromJSON(String json) {
132-
return withMapping(Integer.toString(json.hashCode()), json);
132+
return withMappingFromJSON(Integer.toString(json.hashCode()), json);
133133
}
134134

135135
/**
@@ -138,12 +138,20 @@ public WireMockContainer withMappingFromJSON(String json) {
138138
* @param json Configuration JSON
139139
* @return this instance
140140
*/
141-
public WireMockContainer withMapping(String name, String json) {
141+
public WireMockContainer withMappingFromJSON(String name, String json) {
142142
mappingStubs.put(name, new Stub(name, json));
143143
// TODO: Prevent duplication
144144
return this;
145145
}
146146

147+
/**
148+
* @deprecated use {@link #withMappingFromJSON(String, String)}
149+
*/
150+
@Deprecated
151+
public WireMockContainer withMapping(String name, String json) {
152+
return withMappingFromJSON(name, json);
153+
}
154+
147155
/**
148156
* Loads mapping stub from the class resource
149157
* @param name Name of the mapping stub

0 commit comments

Comments
 (0)