Do we need a EasyMock for CF or CFMock version of JMock now? -----Original Message----- From: Jeff Chastain [mailto:[EMAIL PROTECTED] Sent: Monday, December 04, 2006 12:55 PM To: CF-Talk Subject: Re: Mock Objects for ColdFusion
>Jeff, > >At this point there really isn't a *mock object* solution, per se for CF >developers in the form of any particular framework developed to create >Mocks. Really, the simplest way at this point is to create them by hand. >Also, are you sure you want mock objects that will fully behave like Reactor >or do you just want to stub out that layer to satisfy the Reactor >dependencies? > >I just ask this because mocks are a perhaps the most difficult, tedious and >brittle form of stubbing out a component or set of components. If you have >already considered a simpler approach and decided you need mock objects, >then nevermind. Otherwise, I recommend you do. > > >Paul > Paul, I have two cases (beyond the Mach-II objects) that I am running into issues on. First is with my data access layer and the objects that sit right on top of Reactor. I have an enrollment object which accepts form data from an enrollment application, validates that form data, then creates an enrollmentRecord from Reactor and saves it. How would you test this type of object? The second case is dealing with a web service. The web service acts as a gateway and takes three parameters - the name of the object for it to create, the method on that object to create, and the parameters (struct) to pass to that object. In other words, based upon the parameters passed to the web service, it will perform different functions and return different data. So, how do you test the object that makes use of this web service ... in other words, how do you stub or create a mock object for the web service since its functionality is so fluid? Thanks. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Create robust enterprise, web RIAs. Upgrade & integrate Adobe Coldfusion MX7 with Flex 2 http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262792 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4