Re: Parsing raw HTML?
"Wolfgang Fahl - BITPlan" <[email protected]> Sat, 20 Sep 2008 09:37:19 +0200
| Newsgroups | gmane.comp.web.httpunit.devel |
|---|---|
| Organization | bitplan GmbH |
| Message-ID | <[email protected]> |
Donald wrote: > > Now how do I turn the text back into a WebResponse? Catalin suggested: > I'm guessing the HttpUnit unit tests themselves do this often enough. > Might be a good start. Indeed the class HttpUserAgentTest is used in Unit tests to declare html pages to be tested. The function "declareResource" does this by using the PseudoServer class to emulate a webserver. You could also use a real Webserver and supply the html pages to be served again from your database. It depends a bit on how static the html code is you are going to have in your database. The Psuedoserver will do for quite a lot of cases I think. Yours WolfgangBITPlan - smart solutions Pater-Delp-Str. 1, D-47877 Willich-Schiefbahn Tel. +49 2154 811-480 ax +49 2154 811-481 Web: http://www.bitplan.de bitplan GmbH, Willich - HRB 6820 Krefeld, VAT-ID: 10258040584, Geschäftsführer: Wolfgang Fahl Mit BITPlan effizient zum Erfolg: http://www.bitplan.de ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/