Re: [iText-questions] Unit testing PDF generation

2006-03-30 Thread Chip Whitmer
[I don't mean to start a Unit Testing religious war, but here goes...  :-) ] bruno wrote: Paulo Soares wrote: It's essentially impossible to compare PDFs I second that, yet people keep on asking for PDF Unit tests. It's as if you are a bad Java programmer if you don'

Re: [iText-questions] Unit testing PDF generation

2006-03-28 Thread bruno
Daniel Farinha wrote: Of course, all this relies on your ability to write good tests. I too have seen tests that didn't test anything (but appeared to do so) - and that's worst than no testing, because it leads to wrong assumptions and wastes time. That's what I meant with my remark ;-) I ha

Re: [iText-questions] Unit testing PDF generation

2006-03-28 Thread Daniel Farinha
Allow me... (warning, non iText/PDF related rambling) ;) It's not about adding unit tests to your code. It's about adding code to your unit tests. Well written unit tests tell you (the developer) what exactly you need to implement to make the test run (i.e. acts as a low-level spec). When the

Re: [iText-questions] Unit testing PDF generation

2006-03-27 Thread bruno
Paulo Soares wrote: It's essentially impossible to compare PDFs I second that, yet people keep on asking for PDF Unit tests. It's as if you are a bad Java programmer if you don't provide Unit tests. Based on my experience, I'd rather say that writing Unit test doesn't make you a good programme

Re: [iText-questions] Unit testing PDF generation

2006-03-27 Thread Leonard Rosenthol
At 08:18 AM 3/27/2006, Daniel Farinha wrote: that's also an interesting solution, and something that had occurred to me previously. It has the advantage of providing a very strict comparison (1 pixel out of place and the test would fail), but like you pointed out that's also a disadvantage beca

Re: [iText-questions] Unit testing PDF generation

2006-03-27 Thread Daniel Farinha
Paulo, that's also an interesting solution, and something that had occurred to me previously. It has the advantage of providing a very strict comparison (1 pixel out of place and the test would fail), but like you pointed out that's also a disadvantage because you're dependent on the reliabil

RE: [iText-questions] Unit testing PDF generation

2006-03-27 Thread Paulo Soares
ions@lists.sourceforge.net > Subject: Re: [iText-questions] Unit testing PDF generation > > Bruno, > > Sounds like it's just what I need. > I will report back here once I've implemented it into h2pe. > > Thanks! > > Daniel > > bruno wrote: > >

Re: [iText-questions] Unit testing PDF generation

2006-03-27 Thread Daniel Farinha
Bruno, Sounds like it's just what I need. I will report back here once I've implemented it into h2pe. Thanks! Daniel bruno wrote: Daniel Farinha wrote: Hi all, I'm writing unit tests that need to check the successful generation of PDF documents using iText. Somebody has sent me t

Re: [iText-questions] Unit testing PDF generation

2006-03-27 Thread bruno
Daniel Farinha wrote: >Hi all, > >I'm writing unit tests that need to check the successful generation of >PDF documents using iText. > Somebody has sent me this link once: http://jpdfunit.sourceforge.net/ The product uses PDFBox. I haven't tried it, please let me know if it's any good. br, Bruno

[iText-questions] Unit testing PDF generation

2006-03-27 Thread Daniel Farinha
Hi all, I'm writing unit tests that need to check the successful generation of PDF documents using iText. For example, I'd like to load the generated PDF and query it to assert that a number of elements and formatting have been properly included. This is because I'm writing an XHTML to PDF librar

Re: [iText-questions] Unit testing pdf generation logic using htmlparser

2003-02-01 Thread Paulo Soares
y, January 31, 2003 22:54 Subject: [iText-questions] Unit testing pdf generation logic using htmlparser > Hi, > I've been using iText for some pdf generation at my workplace, and > its a really good piece of software. I usually unit-test all of my code, > and have developed (act

[iText-questions] Unit testing pdf generation logic using htmlparser

2003-01-31 Thread Somik Raha
Hi,     I've been using iText for some pdf generation at my workplace, and its a really good piece of software. I usually unit-test all of my code, and have developed (actually still developing) a simple testing-framework for doing junit testing of pdf creation logic.       I have been able

[iText-questions] Unit Testing pdf generation logic using htmlparser

2003-01-31 Thread Somik Raha
Hi,     I've been using iText for some pdf generation at my workplace, and its a really good piece of software. I usually unit-test all of my code, and have developed (actually still developing) a simple testing-framework for doing junit testing of pdf creation logic.       I have been able