Skip to main content

25 posts tagged with "automated testing"

View All Tags

Unit Testing and Entity Framework: The Filth and the Fury

· 8 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

Just recently I've noticed that there appears to be something of a controversy around Unit Testing and Entity Framework. I first came across it as I was Googling around for useful posts on using MOQ in conjunction with EF. I've started to notice the topic more and more and as I have mixed feelings on the subject (that is to say I don't have a settled opinion) I thought I'd write about this and see if I came to any kind of conclusion...

A Simple Technique for Initialising Properties with Internal Setters for Unit Testing

· 6 min read
John Reilly
OSS Engineer - TypeScript, Azure, React, Node.js, .NET

I was recently working with my colleagues on refactoring a legacy application. We didn't have an immense amount of time available for this but the plan was to try and improve what was there as much as possible. In its initial state the application had no unit tests in place at all and so the plan was to refactor the code base in such a way as to make testing it a realistic proposition. To that end the domain layer was being heavily adjusted and the GUI was being migrated from WebForms to MVC 3. The intention was to build up a pretty solid collection of unit tests. However, as we were working on this we realised we had a problem with properties on our models with internal setters...