tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/871-mock-service-using-rlRobotlegs: Discussion 2013-02-26T09:39:37Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/252492562013-02-24T12:51:23Z2013-02-24T12:51:23Zmock service using RL<div><p>Yes, by creating a mock service implementation. So for instance,
you'd create a <code>ILoginService</code> interface and a
<code>MockLoginService</code> class that implements the interface.
Then you map the MockLoginService to the ILoginService in the
injector:<br></p>
<pre>
<code>//RL2
injector.map( ILoginService ).toSingleton( MockLoginService );
//RL1
injector.mapSingletonOf( ILoginService, MockLoginService );</code>
</pre>
<p>When you're ready with the real implementation of your
LoginService all you'll need to do is modify the above mapping.</p></div>creynderstag:robotlegs.tenderapp.com,2009-10-18:Comment/252492562013-02-25T07:52:09Z2013-02-25T07:52:09Zmock service using RL<div><p>Hey creynders, one more friend in list :) Nice having your tips.
Perfect!</p>
<p>Thanks.</p></div>parikshit.dutta