开发者

JUnit testcases for PDF File

My java pr开发者_StackOverflowogram writes information on PDF form. Does anyone know a good way to write test cases using JUnit to make sure it has printed the required information on PDF form.


Use the same library you are using to write to the PDF form to look for the expected results in the pdf form


Do you create the PDF with code you've written, or do you use a third-party PDF library?

If the latter, you shouldn't be testing this. You should assume the library works, and just test whether you make the right calls to it by mocking/stubbing it out.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜