Skip to main content

Posts

Showing posts from July, 2015

TDD on .NET without Visual Studio

I've been long time user of the NUnit framework (I mean for ages) and I was quite happy with the overall experience. Good performance, lots of tests runners, great integration with Visual Studio, reasonable documentation, the list goes on and on... But lately I've been working mostly on mac and/or linux, and on that space, the experience wasn't that great. I still advocate for TDD (and any kind of automated tests for that matter) but I have to admit that doing TDD with NUnit outside Visual Studio (and without ReSharper support) was quite tedious. While NUnit comes with a console runner, I guess it's there just for CI Servers and not for developers to use. I mean you can use it, but the output is xml... and ... should I say more? ;) So with that problem at hand, I decided to write Contest , a small library that allows me to do TDD on .NET with just an editor and a console . Basic feature set but capable enough to get stuff done. And of course, easy to use from de con...

C# - How about using json files instead of app.config

I think we all agree that working with any kind of xml files is a bit of a pain in the ass. App.config is not an exception to that rule, so I'll show you a little trick that will help you to wipe out those nasty files replacing them for a more sane config file format with almost no changes to your code base.  Thanks to Json.Net, is really easy to read/write C# objects to json files, so if you are starting a new project, use a plain old C# object to store your settings and you are done. But what happens if you wanna replace the way you work with settings in an existing code base? I guess you will try to do it in a way that doesn't requires a whole lotta changes. Well this is one! Keep reading on github And of course, feel free to contact me if you have any question.