Just a quick note about some updates to the RIAForge projects for ColdMock and the CFC Stub Generator.

ColdMock had an issue when trying to mock a method that was defined in a superclass of the target object. This has been corrected. It will also validate arrays of components as return types (i.e. User[]) (thanks to João Fernandes for contributing this fix).

The CFC Stub Generator has some significant additions as well. The tool now supports generating private and public properties if you define these in the UML. Public properties are set in the THIS scope, and associated cfproperty tags are created.

The tool also supports existing CFCs now. It will not overwrite existing components, but will still generate the other files (unit tests, ColdSpring, etc.). This will allow you to quickly generate unit tests for an existing set of components by spec'ing them out in UML.

You can also set up alternate package hierarchies in the tool to define paths to CFCs that are outside of your project (for example, Transfer), and mark a CFC as "active" in the UML tool to instruct the generator to use this path as opposed to the root path you defined for your main project. You must set up the alternate package path and set the base package for the alternate packages as "root" in the UML tool. In this way, the generator will know the proper paths to the external components for typing and ColdSpring path creation. Examples of this setup are included in the bookstore2.zuml/bookstore2.xmi files.

Finally, the tool now has an option to use ColdMock instead of generating staic mock CFC files, and configure the unit tests and the generated ColdSpring file to use the MockFactory to use in the unit tests (requires ColdMock and CF8).

Comments Comments (4) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 6335 Views

Comments (Comment Moderation is enabled. Your comment will not appear until approved.)

  • # Posted By Jarod | 11/16/07 11:55 AM

    Finally the tool has an option to use Coldmock. The generation of staic mock was unfortunate, and somehow disturbing.

  • # Posted By Brian | 11/16/07 12:05 PM

    Until CF8, static mocks were really the only option. The option is still there for folks not on CF8, but at this point I figure most people will at least have the CF8 Developer edition installed locally, even if they also are still developing on CF7.

  • # Posted By david buhler | 11/19/07 6:16 PM

    Will the Stub Generator support reverse engineering? Will it recognize existing CFCs?

  • # Posted By Brian | 11/19/07 6:41 PM

    It won't. Generating the XMI from existing CFCs would be nice but it would be a tremendous amount of work (the XMI format is massive).