O'Reilly logo

JUnit Recipes: Practical Methods for Programmer Testing by J B Rainsberger, Scott Stirling

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required