From: Baumgartner M. <Mar...@sw...> - 2007-06-08 15:17:05
|
Hi all, I started an evaluation of mocking tools comparing rMock and jMock. What I have seen - and understood - so far is very interesting, but still little. Now we are trying to mock an object without a junit suite, that is without extending RMockTestCase The motivation is this:=20 the program is calling a backend system through a Connection-object. This 'border'-object we want to mock and then stuff it into objects using Connection via dependency injection MockConnection mockConnection implements IConnection Actor actor =3D new Actor(mockConnection); I found a Proxy class in your library, but no hint how to use it. I saw this was possible in jMock, so I guess this is possible with Rmock too. The next question is based on this:=20 When the backend system is changing, in particular the form or order of replies, we have to update the mock (otherwise we would mock 'the past'). Because there is a huge number of request/reply pairs, we must automate this. The idea is to have a switch like "record" that would write out the requests and its replies, from where we could generate a new Mock.=20 Did anybody try this and has a suggestion? Thanks for help Markus P.S. I googled the Internet for hours to find more documentation or examples, but didn't find anything. The documentation is addressing people that know a lot how the program works, but for newbies it is not suited (I learned how to mock with jMock documentation, which is not good as well , but a bit better. That's a pity because it does not ease the access to the tool. (I even started to write my own documentation including a testsuite with examples showing the different use cases and I guess such a suite with simple example might be handy for other users too. At least here it was...) Is there anybody out there, who has or found some more documentation? =20 =20 This message is for the named person's use only. It may contain = confidential, proprietary or legally privileged information. No = confidentiality or privilege is waived or lost by any mistransmission. = If you receive this message in error, please notify the sender urgently = and then immediately delete the message and any copies of it from your = system. Please also immediately destroy any hardcopies of the message. = You must not, directly or indirectly, use, disclose, distribute, print, = or copy any part of this message if you are not the intended recipient. = The sender's company reserves the right to monitor all e-mail = communications through their networks. Any views expressed in this = message are those of the individual sender, except where the message = states otherwise and the sender is authorised to state them to be the = views of the sender's company. |