Hi Chuck, Yes, you can use "new Context()" as long as you don't use the "dispatcher" property.
Best regards, Jerome > -----Message d'origine----- > De : Chuck Hinson [mailto:[EMAIL PROTECTED] > Envoyé : jeudi 1 février 2007 18:51 > À : [email protected] > Objet : RE: RE: Unit testing for Resource > > It appears that a meaningful request just requires a proper > method and a URI, but I'm not sure what's required to create > a meaningful context. If my resource has no need of Context, > is it OK to just use Context() to create a context object? > > --Chuck > > -----Original Message----- > From: Jerome Louvel [mailto:[EMAIL PROTECTED] > Sent: Thursday, February 01, 2007 12:10 PM > To: [email protected] > Subject: RE: Unit testing for Resource > > > I don't have examples but you need to call either the > constructor with three parameters (Context, Request, > Response) or use the default on and then call > init(Context,Request,Response). > > Your main concern should be to create meaningful Context, > Request and Response instances. Then, invoking > getRepresentation() manually should produce the expected results. > > Best regards, > Jerome > > > -----Message d'origine----- > > De : Chuck Hinson [mailto:[EMAIL PROTECTED] Envoyé : jeudi 1 > > février 2007 16:59 À : [email protected] Objet : > Unit testing > > for Resource > > > > > > Anyone have example of unit tests for Resource subclasses? > > > > I'm trying to figure out what all needs to be set up before > I can do > > things like invoke a Resource's getRepresentation method. > > > > --Chuck > > > > ------------------------------------ > > Chuck Hinson > > Gestalt LLC > > phone: 610.994.2833 > > IM: chucking24 (Yahoo) > >

