Skip to Content.
Sympa Menu

xom-interest - Re: [XOM-interest] unit testing xom classes

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: teknokrat <teknokrat AT yahoo.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: Re: [XOM-interest] unit testing xom classes
  • Date: Fri, 24 Mar 2006 17:58:53 +0000

Grant Wood wrote:
If I understand what you said, you have your test XML in a string.

I would suggest writing out your string to a temporary file, then use a file:/// URL for your test. Upon completion, delete your temp file. If you do this for more than one test, write a quick method that you pass your String to, and it returns the URL for the temp file it created. This way your test matches your use case. You could use the same temp file for more than one test to save a bit on the setup and tear-down performance.


Grant Wood

On Mar 23, 2006, at 6:38 AM, teknokrat wrote:

Does anyone have any advice for unit testing classes that use XOM. The
problem i am having is that my classes all use urls but in my test i
just want to supply a string. Anyone solved this?

thanks

_______________________________________________
XOM-interest mailing list
XOM-interest AT lists.ibiblio.org
http://lists.ibiblio.org/mailman/listinfo/xom-interest

Ok, I'll give it a shot. i was hoping there might be a way to do it all in memory but i guess not.





Archive powered by MHonArc 2.6.24.

Top of Page