Author Archives: Derik Whittaker

JavaScript Code Coverage using Karma-Coverage w/ Grunt

As part of our ongoing effort at my client to setup a testing environment for our JavaScript code I wanted to also setup the ability to do code coverage on our files. To accomplish this I am going to integrate … Continue reading 

Posted in Grunt, Jasmine, Testing | Leave a comment

Forcing MVC Model State to invalid for Unit Tests

Unit testing ASP.Net MVC applications is easier than every today. But how do you force ModelState.IsValid to be false in a unit tests? The simple thought would be to simply create an invalid object and pass that into your action … Continue reading 

Posted in MVC | 3 Comments

Using Grunt/Karma/Jasmine-Ajax inside your Jasmine Tests

My current client is trying to add JavaScript specs to its code base and we have decided to implement a Grunt/Karma/Jasmine solution. Like many (if not most) JavaScript code bases our code will make remote calls via jQuery to the … Continue reading 

Posted in Grunt, Jasmine, Testing | 2 Comments

C# 6 Features – Private Auto Properties

C# 6 is on the horizon with a slew of new features being introduced. One of them that I find pretty cool is the ability to have Auto Properties with an inferred private setter. It is very typical in my … Continue reading 

Posted in C# | 2 Comments

Solving Json discrepancies using a JsonConverter

During my day job I am a client developer who is beholden to various back end API’s. Normally these API’s are well thought out and pretty easy to use, and normally their resulting json model make sense. But as we … Continue reading 

Posted in C# | Tagged | 1 Comment