Using the jQuery UI AutoComplete widget with Knockout

The jQuery UI AutoComplete widget is a nice one to use when the a set of know values is frequently used, like a list of city names, but you still want to leave the end user the capability to enter completely new values. And as can be seen from the examples it’s basic usage is really simple and straightforward, something like: 1: var firstNames = ['Joe', 'Maurice', 'Jake']; 2: $(‘#firstName’).autocomplete({ source: firstNames });   Adding Knockout to the mix Knockout is also a nice data-binding library that is really easy to use. A simple page that lets a user enter … Continue reading Using the jQuery UI AutoComplete widget with Knockout

Unit testing a ASP.NET WebAPI 2 controller

Earlier this year I wrote a blog post about how to unit test ASP.NET WebAPI controllers. It turned out that in order to do a good job of testing the public ApiController methods you would need to quite a bit of setup. Most of the time this was just about providing a HttpConfiguration object but sometimes, like in the case of responding to a post request, quite a bit more would be required. One of the goals of the ASP.NET WebAPI 2 was to make testing of controllers easier. This has been achieved by adding a new response interface named … Continue reading Unit testing a ASP.NET WebAPI 2 controller