Mocking multipart/form-data HttpRequestMessage for testing ASP.NET ApiController

I recently had a problem where I needed to unit test an ApiController action that read data off of the controller’s request object, in other words, something that looks like this: https://gist.github.com/williamhallatt/c66ace1c849d9b52696b5f121481f1ad The real-world action receives a multipart/form-data request (a form), which contains an uploaded file as one of its fields. Reading the form fields and …

Uncrustify, Windows Shell Script and Visual Studio Build Events

If you're here, you probably know this already, but Uncrustify is a "code beautifier" with 454 configurable options at the time of writing (in short, you can pretty much set up any any code style convention you can imagine). Since I am a massive supporter of "anything that can be automated should be automated" I decided …

Qt Application, VS2008 and “requires MFC shared dll version”

I recently ran into a problem where I needed to build a Qt application that depended on a library that made use of MFC.  I started by building the Qt side (GUI, etc) with QtCreator and then proceeded to import the .pro file into VS2008 using the standard VS Qt plugin before adding the mentioned native …

Qt Creator Zen Burn Theme

This here is a simple sample of what my Qt Creator Zen Burn theme looks like and is not so much a write-up as it is a redirect since all the reading you might need to do is already available from the download link: Enjoy!