Whew!! It took an entire evening but i finally cracked the mysteries of the BizUnit context and how it can be used. I even wrote a couple of my own custom steps to manipulate context. Writing BizUnit custom steps is really easy. The ITestStep interface and the Execute method are all you need.


What really took me by surprise is the number of bugs in it. Take the XmlContextLoader for example. This step allows you to extract data from an Xml file ,using XPath expressions, and store them in the Context. The step will not work out of the box because a stream which contains the data is being read into a string, and then the stream is being used to load up an XmlDocument without rewinding it first. I also fixed a couple of others including the weird “Param” typo that i blogged about earlier. Just after i had finished all this i checked the GDN workspace and found a reply to my posts from Tanveer Rashid which was quite helpful, but then again, i had solved the issue by that time.


So, Im planning to write a detailed document covering the use of Context and perhaps extend it to be a general BizUnit tutorial. I’ve reworked the documentation thoroughly especially in the area of the context load steps and im pretty comfortable that its much clearer now than earlier. I’ve also written more tests and documented the existing ones so folk can get an idea of whats available. I’m also considering starting up a BizUnit extensions project on the lines of NAntContrib to add more custom steps for the community (if Kevin doesnt grant me permissions to join the existing workspace, that is). Let me know if this is of interest and if there are custom steps that you would like to see. I should have the Context tutorial up in a couple of days max.