Unfortunately, you can't have that level of unit testing.  You can test
that things serialize the way you want them to, but the best you can do
is test that FooStructure when set to values X,Y,Z gives you bytes "08
0F 06 00 99".  We did some cool stuff in HSSF with generating records
for awhile that also generated unit tests (recordgenerator is in
cvs)...not sure if its useful for powerpoint.

Sorry to be such a hard ass, it didn't start out that way over night.  :-)

-Andy

Nick Burch wrote:
Hi All

I've been following the discussions on unit testing the formula code with interest. I'm hoping to write some unit tests shortly for the powerpoint code, but I'm not sure how best to go about it.

I can think of a few useful unit tests straight off. Things like ensuring that a file gets read in and is then written out the same, checking that records fine their children correctly, that sort of thing. I guess to do these I'll need to knock up a few test ppt files to include with the tests, but this shouldn't be too bad.

The main issue is that much of the hard work ATM is getting powerpoint to like apparently valid files. How best should I handle a test that spits out a file, but needs someone to copy it to windows, open up powerpoint, and see if it likes the file?

Thanks
Nick


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/




--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] Mailing List: http://jakarta.apache.org/site/mail2.html#poi The Apache Jakarta POI Project: http://jakarta.apache.org/poi/



Reply via email to