|
24 | 24 | */ |
25 | 25 | public class Approvals |
26 | 26 | { |
| 27 | + /** |
| 28 | + * Verifies the output file (received) against a Golden Master file (approved)<br/> |
| 29 | + * If there is no GoldenMaster, then the test will fail |
| 30 | + * <div><b>Example:</b> {@code Approvals.verify(response)}</div> |
| 31 | + * |
| 32 | + * @param response |
| 33 | + * The string to be verified |
| 34 | + */ |
27 | 35 | public static void verify(String response) throws Exception |
28 | 36 | { |
29 | 37 | verify(new ApprovalTextWriter(response, "txt"), FileTypes.Text); |
@@ -60,6 +68,14 @@ public static void verifyHtml(String response) throws Exception |
60 | 68 | { |
61 | 69 | verify(new ApprovalTextWriter(response, "html"), FileTypes.Html); |
62 | 70 | } |
| 71 | + /** |
| 72 | + * Verifies the output file (received) against a Golden Master file (approved) <br/> |
| 73 | + * If there is no GoldenMaster, then the test will fail |
| 74 | + * <div><b>Example:</b> {@code Approvals.verify(component)}</div> |
| 75 | + * |
| 76 | + * @param component |
| 77 | + * The component to be verified |
| 78 | + */ |
63 | 79 | public static void verify(Component component) |
64 | 80 | { |
65 | 81 | Approvals.verify(new ComponentApprovalWriter(component), FileTypes.Image); |
@@ -111,6 +127,15 @@ public static ApprovalNamer createApprovalNamer() |
111 | 127 | { |
112 | 128 | return new JUnitStackTraceNamer(); |
113 | 129 | } |
| 130 | + /** |
| 131 | + * Verifies the output file (received) against a Golden Master file (approved)<br/> |
| 132 | + * If there is no GoldenMaster, then the test will fail |
| 133 | + * <div><b>Example:</b> {@code Approvals.verify(object)}</div> |
| 134 | + * |
| 135 | + * @param response |
| 136 | + * The object to be verified <br/> |
| 137 | + * NOTE: the object will be returned as a String |
| 138 | + */ |
114 | 139 | public static void verify(Object o) throws Exception |
115 | 140 | { |
116 | 141 | Approvals.verify(o + ""); |
|
0 commit comments