Hi Amila, You have to create mock object of HttpservletRequest. Can we use EasyMock in our products. Or currently we are using any other mock object creation frameworks?
http://easymock.org Thanks On Tue, Oct 21, 2014 at 11:27 AM, Godwin Amila Shrimal <[email protected]> wrote: > Hi, > > I am working on test automation of OAuth, In that I need to pass a > HttpServletRequest object to apache amber oauth2 API and get the > authorization code. Can any one suggest me a better way to programmatically > create a HttpServletRequest. Please see below the code snippet used to get > the authorization code. > > OAuthAuthzResponse authzResponse = OAuthAuthzResponse > .oauthCodeAuthzResponse(request) > > String code = authzResponse.getCode(); > > Thanks > Godwin > > -- > *Godwin Amila Shrimal* > Senior Software Engineer > WSO2 Inc.; http://wso2.com > lean.enterprise.middleware > > mobile: *+94772264165* > linkedin: *http://lnkd.in/KUum6D <http://lnkd.in/KUum6D>* > twitter: https://twitter.com/godwinamila > > _______________________________________________ > Dev mailing list > [email protected] > http://wso2.org/cgi-bin/mailman/listinfo/dev > > -- Manoj Gunawardena Tech Lead WSO2, Inc.: http://wso2.com lean.enterprise.middleware Mobile : +94 77 2291643
_______________________________________________ Dev mailing list [email protected] http://wso2.org/cgi-bin/mailman/listinfo/dev
