Is it possible to mock a class in such way that "new AClass()" returns predefined mock automagically?

14 views
Skip to first unread message

andrei....@vgw.co

unread,
Jan 23, 2014, 3:53:32 AM1/23/14
to mock...@googlegroups.com
Hi,

  I am trying to unit test method which creates URLLoader() in order to communicate with the server.  Ideally I would like to define mock for URLLoader() and have "new URLLoader()" return this mock.  Is it possible? And if it is possible, how I go about doing it?

Your comments will be highly appreciated,

Cheers,
  Andrei
Reply all
Reply to author
Forward
0 new messages