Appendix A. Complete solutions

Here you can find complete solutions to some of the problems we raise in the recipes. We did not want to confuse these recipes with code samples that are hundreds of lines long, but we thought it important to include the complete solutions, so we have done so here. Consult table A.1 to see the recipes to which these solutions correspond.

Table A.1. The complete solutions, and the recipes to which they correspond

Complete solution

Follow up to recipe

A.1—Define a test in XML 4.9—Define a test suite in XML
A.2—Parameterized Test Case overriding runTest() 4.8—Build a data-driven test suite
A.3—Ignore the order of elements in an XML document 9.2—Ignore the order of elements in an XML document
A.4—Test an ...

Get JUnit Recipes: Practical Methods for Programmer Testing now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.