CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Jay Kimble -- The Dev Theologian

Philosophizing about the .Net religion

TDD Challenge for my co-bloggers

Ok, I have a challenge for my fellow bloggers... the TDD guys (You know how you are). I recently told Jeremy that I have yet to be successful at doing TDD. Mainly because I often find myself into arenas that seem difficult to test with unit testing tools like NUnit.

So here's the scenario. I am getting ready to work on an extension to the MS Ajax ScriptManager control. For once MS built a control that you can inherit from. My plan is to extend this control and add some of my JAAJAX functionality to it. In particular I plan on adding PageMethods support like we had in the Atlas CTPs; I want to create PageMethods support that doesn't require static methods as exposed methods and that post the entire form back to the server, so that the exposed method can reference the current state of controls on the page.

Anyway, as I start down this path I thought I might give the whole TDD thing a go again. Unfortunately this is exactly the type of scenario that keeps me from being a TDD guy. Essentially, my code will override the prerender event and write my own code to the page as well as call the original prerender event.

I'm just not sure how one would go about testing this... do I create a method that my prerender will call and specifically call that method? How will I know that the resulting Javascript will work fine? Do you see my predicament? Just curious if one of you TDD guys can 'splain it to me and the masses...

BTW, my TDD blogging brethren please feel free to blog an answer since I think it may require more than 3 sentences...

Technorati Tags: , ,



Check out Devlicio.us!

This Blog

Syndication

News

CodeBetter.Com Home
Current Threat level
Terror Alert Level