Skip to content

Commit

Permalink
. t update tests
Browse files Browse the repository at this point in the history
Co-authored-by: Jay Bazuzi <jay@bazuzi.com>
Co-authored-by: Llewellyn Falco <llewellyn.falco@gmail.com>
  • Loading branch information
3 people committed Oct 7, 2024
1 parent 6432fb5 commit 369a135
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -61,3 +61,4 @@
* JsonJacksonApprovals. [verifyAsJson ](https://github.com/approvals/ApprovalTests.Java/blob/master/approvaltests/src/main/java/org/approvaltests/JsonJacksonApprovals.java#L25-L29) (Object, Function1, $\color{#AAA}{\textsf{Options}}$)
* JsonXstreamApprovals. [verifyAsJson ](https://github.com/approvals/ApprovalTests.Java/blob/master/approvaltests/src/main/java/org/approvaltests/JsonXstreamApprovals.java#L18-L21) (Object, $\color{#AAA}{\textsf{Options}}$)
* VelocityApprovals. [verify ](https://github.com/approvals/ApprovalTests.Java/blob/master/approvaltests/src/main/java/org/approvaltests/velocity/VelocityApprovals.java#L16-L24) (ContextAware, $\color{#AAA}{\textsf{Options}}$)
* XmlXomApprovals. [verifyXml ](https://github.com/approvals/ApprovalTests.Java/blob/master/approvaltests/src/main/java/org/approvaltests/XmlXomApprovals.java#L17-L20) (String, $\color{#AAA}{\textsf{Options}}$)
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void testEachMethodHasOneWithOptions()
public static List<Class<?>> getApprovalClasses()
{
return Arrays.asList(Approvals.class, CombinationApprovals.class, AwtApprovals.class, JsonApprovals.class,
VelocityApprovals.class, JsonJacksonApprovals.class, JsonXstreamApprovals.class);
VelocityApprovals.class, JsonJacksonApprovals.class, JsonXstreamApprovals.class, XmlXomApprovals.class);
// TODO: missing verification that JsonApprovals, JsonJacksonApprovals and JsonXStreamApprovals offer the same verify methods
}
public static void verifyEachVerifyMethodHasOneWithOptions(Class<?> approvalsClass, String methodPrefix)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@ public void getLineNumberOfThisMethod() throws Exception
{
addApprovalTestPath();
var expected = """
(line 5,col 3)-(line 7,col 3)
(line 13,col 3)-(line 16,col 3)
""";
Method method = XmlXomApprovals.class.getMethod("verify", String.class);
Method method = XmlXomApprovals.class.getMethod("verifyXml", String.class);
Range r = ParserUtilities.getLineNumbersForMethod(method);
Approvals.verify(r, new Options().inline(expected));
}
}
}

0 comments on commit 369a135

Please sign in to comment.