Integration testing in ASP.NET MVC 6

In ASP.NET 5, Microsoft has produced a Nuget package called Microsoft.AspNet.TestHost which you can easily use to run your ASP.NET 5 in memory. We can use that feature of self hosted application to create integration tests. Creating integration test project After creating a new ASP.NET 5 solution open file and dependency for XUnit.DNX integration packages and the Microsoft.AspN…

By Dawid on (tags: asp.net 5, mvc 6, testing, categories: code)

Mock your database with no effort

This is a tool I was looking for for a very long time. The Effort is a library that allows you to mock your database with basically no effort. This is simply a database provider for Entity Framework which uses an in memory database (NMemory). Although it is still in beta version it is fully functional for most cases. I found it very usefull in unit and functional testing. Ok so…

By Mirek on (tags: Effort, Entity Framework, testing, categories: tools)

Testing the web - a new hope

There are plenty of ways to test web apps, but most of them require a cumbersome setup and a lot of tools installed and I’m just too lazy to do that. But I just found something that may work in my favour. The fact that I will need something more than unit tests for web apps is obvious – I just didn’t have the time/urge/heart to set up ‘the whole machine’. I’ve had some experien…

By on (tags: fluent, testing, categories: tools, web)

Mocking application settings

Last time I showed a simple way of using application settings in our wpf application. This time I would like to present you my way of testing Properties.Settings, or rather mocking it in our application tests. First of all we need to make our application code independent of the concrete implementation of auto generated Settings class. Let’s define an interface which will contai…

By Mirek on (tags: mocking, settings, testing, categories: code)