Skip to content

XmlXomApprovals

Compare
Choose a tag to compare
@LarsEckart LarsEckart released this 07 Oct 18:02
· 48 commits to master since this release

Xom has support for emojies, so it can be a confinient way to use for xml that contains emojies.

    var expected = """
        <?xml version="1.0" encoding="UTF-8"?>
        <a>
          <b>😸 &amp; 🐶</b>
        </a>
        """;
    String minimizedXml = expected.replaceAll("\n", " ").replace("  ", "");
    XmlXomApprovals.verifyXml(minimizedXml, new Options().inline(expected));

We also allow you to create your own pretty printer when using Approvals.verify.

Or no pretty printing at all, then use

Approvals.verifyXml(xml, x -> x);