Skip to content

Commit a364260

Browse files
committed
removed depercated code
1 parent 4d96544 commit a364260

File tree

1 file changed

+0
-147
lines changed

1 file changed

+0
-147
lines changed

java/org/approvaltests/Approvals.java

Lines changed: 0 additions & 147 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,6 @@
4444

4545
public class Approvals
4646
{
47-
/**
48-
* @deprecated Use verify()
49-
*/
50-
public static void approve(String response) throws Exception
51-
{
52-
verify(response);
53-
}
5447
public static void verify(String response) throws Exception
5548
{
5649
verify(new ApprovalTextWriter(response, "txt"), FileTypes.Text);
@@ -59,48 +52,20 @@ public static void verify(Object o) throws Exception
5952
{
6053
verify("" + o);
6154
}
62-
/**
63-
* @deprecated Use verifyAll()
64-
*/
65-
public static <T> void approve(String label, T[] array) throws Exception
66-
{
67-
verifyAll(label, array);
68-
}
6955
public static <T> void verifyAll(String label, T[] array) throws Exception
7056
{
7157
verify(new ApprovalTextWriter(StringUtils.toString(label, array), "txt"), FileTypes.Text);
7258
}
73-
/**
74-
* @deprecated Use verifyAll()
75-
*/
76-
public static <T> void approve(String header, String label, T[] array) throws Exception
77-
{
78-
verifyAll(header, label, array);
79-
}
8059
public static <T> void verifyAll(String header, String label, T[] array) throws Exception
8160
{
8261
verify(new ApprovalTextWriter(formatHeader(header) + StringUtils.toString(label, array), "txt"),
8362
FileTypes.Text);
8463
}
85-
/**
86-
* @deprecated Use verifyAll()
87-
*/
88-
public static <T> void approve(T[] values, Function1<T, String> f1)
89-
{
90-
verifyAll(values, f1);
91-
}
9264
public static <T> void verifyAll(T[] values, Function1<T, String> f1)
9365
{
9466
String text = ArrayUtils.toString(values, f1);
9567
verify(new ApprovalTextWriter(text, "txt"), FileTypes.Text);
9668
}
97-
/**
98-
* @deprecated Use verifyAll()
99-
*/
100-
public static <T> void approve(String header, T[] values, Function1<T, String> f1)
101-
{
102-
verifyAll(header, values, f1);
103-
}
10469
public static <T> void verifyAll(String header, T[] values, Function1<T, String> f1)
10570
{
10671
verifyAll(header, Arrays.asList(values), f1);
@@ -114,124 +79,47 @@ private static String formatHeader(String header)
11479
{
11580
return StringUtils.isEmpty(header) ? "" : header + "\r\n\r\n\r\n";
11681
}
117-
/**
118-
* @deprecated Use verifyAll()
119-
*/
120-
public static <T> void approve(String label, Iterable<T> array) throws Exception
121-
{
122-
verifyAll(label, array);
123-
}
12482
public static <T> void verifyAll(String label, Iterable<T> array) throws Exception
12583
{
12684
verify(new ApprovalTextWriter(StringUtils.toString(label, array), "txt"), FileTypes.Text);
12785
}
128-
/**
129-
* @deprecated Use verifyAll()
130-
*/
131-
public static <T> void approve(String header, String label, Iterable<T> array) throws Exception
132-
{
133-
verifyAll(header, label, array);
134-
}
13586
public static <T> void verifyAll(String header, String label, Iterable<T> array) throws Exception
13687
{
13788
verify(new ApprovalTextWriter(formatHeader(header) + StringUtils.toString(label, array), "txt"),
13889
FileTypes.Text);
13990
}
140-
/**
141-
* @deprecated Use verify()
142-
*/
143-
public static void approve(Component c) throws Exception
144-
{
145-
verify(c);
146-
}
14791
public static void verify(Component c) throws Exception
14892
{
14993
verify(new ComponentApprovalWriter(c), FileTypes.Image);
15094
}
151-
/**
152-
* @deprecated Use verifyHtml()
153-
*/
154-
public static void approveHtml(String response) throws Exception
155-
{
156-
verifyHtml(response);
157-
}
15895
public static void verifyHtml(String response) throws Exception
15996
{
16097
verify(new ApprovalTextWriter(response, "html"), FileTypes.Html);
16198
}
162-
/**
163-
* @deprecated Use verify()
164-
*/
165-
public static void approve(File generateFile)
166-
{
167-
verify(generateFile);
168-
}
16999
public static void verify(File generateFile)
170100
{
171101
verify(new FileApprovalWriter(generateFile), FileTypes.File);
172102
}
173-
/**
174-
* @deprecated Use verify()
175-
*/
176-
public static void approve(Image image)
177-
{
178-
verify(image);
179-
}
180103
public static void verify(Image image)
181104
{
182105
approve(ImageWriter.toBufferedImage(image), createApprovalNamer());
183106
}
184-
/**
185-
* @deprecated Use verify()
186-
*/
187-
public static void approve(BufferedImage bufferedImage)
188-
{
189-
verify(bufferedImage);
190-
}
191107
public static void verify(BufferedImage bufferedImage)
192108
{
193109
verify(new ImageApprovalWriter(bufferedImage), FileTypes.Image);
194110
}
195-
/**
196-
* @deprecated Use verify()
197-
*/
198-
public static void approve(ApprovalWriter writter, ApprovalNamer namer, ApprovalFailureReporter reporter)
199-
{
200-
verify(writter, namer, reporter);
201-
}
202111
public static void verify(ApprovalWriter writter, ApprovalNamer namer, ApprovalFailureReporter reporter)
203112
{
204113
verify(new FileApprover(writter, namer), reporter);
205114
}
206-
/**
207-
* @deprecated Use verify()
208-
*/
209-
public static void approve(ApprovalWriter writter, String fileType)
210-
{
211-
verify(writter, fileType);
212-
}
213115
public static void verify(ApprovalWriter writter, String fileType)
214116
{
215117
verify(writter, createApprovalNamer(), ReporterFactory.get(fileType));
216118
}
217-
/**
218-
* @deprecated Use verifyXml()
219-
*/
220-
public static void approveXml(String xml) throws Exception
221-
{
222-
verifyXml(xml);
223-
}
224119
public static void verifyXml(String xml) throws Exception
225120
{
226121
verify(new ApprovalXmlWriter(xml), FileTypes.Text);
227122
}
228-
/**
229-
* @deprecated Use verify()
230-
*/
231-
public static void approve(FileApprover approver, ApprovalFailureReporter reporter)
232-
{
233-
verify(approver, reporter);
234-
}
235123
public static void verify(FileApprover approver, ApprovalFailureReporter reporter)
236124
{
237125
try
@@ -263,36 +151,15 @@ public static void verify(FileApprover approver, ApprovalFailureReporter reporte
263151
throw ObjectUtils.throwAsError(e);
264152
}
265153
}
266-
/**
267-
* @deprecated Use verify()
268-
*/
269-
public static void approve(ExecutableQuery query) throws Exception
270-
{
271-
verify(query);
272-
}
273154
public static void verify(ExecutableQuery query) throws Exception
274155
{
275156
verify(new ApprovalTextWriter(query.getQuery(), "txt"), new JUnitStackTraceNamer(),
276157
new ExecutableQueryFailure(query));
277158
}
278-
/**
279-
* @deprecated Use verify()
280-
*/
281-
public static void approve(Map map) throws Exception
282-
{
283-
verify(map);
284-
}
285159
public static void verify(Map map) throws Exception
286160
{
287161
verify(new ApprovalTextWriter(StringUtils.toString(map), "txt"), FileTypes.Text);
288162
}
289-
/**
290-
* @deprecated Use verify()
291-
*/
292-
public static void approve(RackResponse response) throws Exception
293-
{
294-
verify(response);
295-
}
296163
public static void verify(RackResponse response) throws Exception
297164
{
298165
if (isImage(response))
@@ -305,24 +172,10 @@ public static void verify(RackResponse response) throws Exception
305172
verifyHtml(response.getResponse().toString());
306173
}
307174
}
308-
/**
309-
* @deprecated Use verify()
310-
*/
311-
public static void approve(ResultSet rs) throws Exception
312-
{
313-
verify(rs);
314-
}
315175
public static void verify(ResultSet rs) throws Exception
316176
{
317177
verify(new ResultSetApprovalWriter(rs), "csv");
318178
}
319-
/**
320-
* @deprecated Use verify()
321-
*/
322-
public static void approve(SqlLoader loader) throws Exception
323-
{
324-
verify(loader);
325-
}
326179
public static void verify(SqlLoader loader) throws Exception
327180
{
328181
verify(new SqlLoader.ExecutableWrapper(loader));

0 commit comments

Comments
 (0)