unit testing plugins

Greetings all,
  Is there any documentation/advice for unit testing plugins?
Basically, my plugin relies on specific things in the
requestcollection, so i need to know how to bootstrap the controller
and all that jazz in a unit test.

thanks!

marc

Marc,

They way I have tested plugins is by using the baseMXunit Test class in the core. This way I am guaranteed that I can play with all of the framework’s features in my plugin’s unit test.

In SVN you can see tons of unit tests on plugins.

Again, you are the guru in this, so if you can streamline our process or actually enhance this, please please please please do!!!

Luis

Well, hell, that was easy enough. not sure why I wasn't "seeing" it before.

here's what i ended up with:

<cffunction name="testEncode" returntype="void">

<cfset formatter = getController().getPlugin("JQGridFormatter",true)>
  <cfset rc = getRequestContext().getCollection()>
    <cfset rc.page = 1>
    <cfset rc.rows=25>
    <cfset rc.sidx="myid">
    <cfset rc.sortx = "desc">
    <cfset data = createGridQuery()>
    <cfset json =
formatter.encode(data=data,idfield="myid",includecols="myid,myvalue,someotherjunk")>

   ..... assertions here.

</cffunction>

bottom line, i should've just opened up that mxunit test case to see
what goodies were there waiting for me.

Also, Luis... the PDF cheat sheet you put out there is gold!

thanks.

marc