* Peter Donald <[EMAIL PROTECTED]> [2003-10-30 09:00]: > On Thu, 30 Oct 2003 10:22 pm, Michal Maczka wrote: > > There is a lot of examples of such unit tests. > > E.g. I18N service which reads messages from XML files. To test it you > > need to provide few XML files > > and to place them somewhere. Mock object are not really helpful here. > > I am not sure I agree. You can always manually construct the XML via something > like > > String text = "<i18n><entry key=\"foo\" value=\"blah\"/></i18n/>" > Reader r = new StringReader( text ); > InputSource source = new InputSource( r );
Why is this better than getClass().getResourceAsStream("i18n.xml"); ? -- Alain Javier Guarnieri del Gesu - [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]