Just an example, in development I need to test the functionality add new jugger but I don't want to send emails every time I test it, because I have previously test that service. Well, I only need to mock the dependency to the mail sender bean in this way
<bean id="mailSender" class="it.jugpadova.mock.ParancoeMockMailSender"/>
And it's done. Honestly think for a while about one of the crap application you are working on in your job. Could you easily mock the dependencies as easily as we do in jugevents? Well I think the answer is no.
I should dedicate more time in development jugevents as it's good for my education and even for my mood.
Nessun commento:
Posta un commento