Hi,

you should be able to create any kind of class even inside the test name space. 
So I would create the class to be mocked, define the corresponding interface 
and create the mocked functions, which the interface is requiring.

Now you are able to create and apply that mocked class instance instead of the 
original one.


Gruß
Mustafa Sak

Applications & Integration
1&1 Internet AG | Ernst-Frey-Straße 10 | 76135 Karlsruhe | Germany

-----Ursprüngliche Nachricht-----
Von: halcwb [mailto:hal...@gmail.com] 
Gesendet: Donnerstag, 15. Januar 2015 15:53
An: qooxdoo-devel@lists.sourceforge.net
Betreff: [qooxdoo-devel] Mock object with interface

How can I create a test mock that implements an existing interface? For example 
I have a controller that will perform some actions on a view. The view 
implements an interface. So, I could test with a mock object that implements 
the interface to test whether the controller calls some methods on the 
interface.



--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Mock-object-with-interface-tp7586676.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

------------------------------------------------------------------------------
New Year. New Location. New Benefits. New Data Center in Ashburn, VA.
GigeNET is offering a free month of service with a new server in Ashburn.
Choose from 2 high performing configs, both with 100TB of bandwidth.
Higher redundancy.Lower latency.Increased capacity.Completely compliant.
http://p.sf.net/sfu/gigenet
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to