dcsimg
Mock objects
3 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   s_karthik
Posted On:   Thursday, May 15, 2003 04:45 AM


What are mock objects?Why do we use mock objects in Unit testing?What are named singleton objects.



Thanks.



S.Karthik

Re: Mock objects

Posted By:   Nikhil_Varma  
Posted On:   Monday, May 19, 2003 08:03 AM

If you would like to test a method(x),which calls another method(y),you would actually be testing both x and y,which is not a "Unit test".One approach to isolate a unit from the rest of the system would be to use mock objects.


http://www.mockobjects.com/wiki/Faq

Re: Mock objects

Posted By:   Jeanne_Boyarsky  
Posted On:   Friday, May 16, 2003 08:51 AM

Mock objects help you test your code without dependencies. For example, you can test a servlet without a server of a database call without a database.

Re: Mock objects

Posted By:   Christopher_Koenigsberg  
Posted On:   Thursday, May 15, 2003 06:52 AM

If you are trying to test a method which takes complex objects as parameters, then you have to make up some appropriate objects; hence the term "mock objects" for these.

About | Sitemap | Contact