Test base class thanks to Rob Connery
I saw this great testbase class in a Tekpub video. Thank goodness for tekpub videos. I wish everything that I purchased was that pragmatic. public class TestBase { public static string GetCaller() {...
View ArticleSafely refactoring stored procedures into code with unit tests
Refactoring long stored procedures is a drag. There is no way around it. Sometimes it can be terrifying. If the sql you are staring at is an import production proc and you have to make a change to it…...
View ArticleRolling rolling rolling – rolling back your data back in integration tests
A couple years ago, I had just started refactoring a legacy codebase by adding integration tests and was manually rolling back the database changes with several lines of handwritten sql deletes…...
View ArticleNHibernate Session Manager needs HttpContext for NUnit testing
In a codebase I work in, NHibernate needs an HttpContext to get its current session – like this: public static ISession GetCurrentSession() { var context = HttpContext.Current; var currentSession =...
View ArticleReading hidden field values with Selenium
I have a need to hide a guid used for an index on a .cshtml so I can get model binding on controls dynamically added with ajax (it’s a long story) (that was a mouthful) I had a hard time finding the...
View ArticleClicking a radio button with Selenium
Here is a little code to find and click the first radio button in a set using Selenium: var didYouGraduateRadioButtonName = string.Format("{0}{1}{2}", "rb_Graduated[", indexValueToUse, "]"); var...
View Article
More Pages to Explore .....