TDD

Mocking Entity Framework 6 - How To Do It, When NOT To Do It

December 16, 2021 in Testing TDD Entity Framework
Read Time: 8 minutes
Mocking Entity Framework 6 - How To Do It, When NOT To Do It
Introduction First off, let me make a few assumptions if you’re reading this article and trying to mock with Entity Framework 6: You’re on a legacy codebase. If you weren’t you’d be using Entity Framework Core and the In-Memory Provider. You’re not utilizing Database Migrations. If you were, it may probably be easier to create a new database and run tests using localDb. Your schema is extremely large. With a large database schema (often seen in legacy systems) data setup can become extremely difficult.
Read more...

Zero Tests to TDD - What I've Learned

July 26, 2020 in Testing TDD Entity Framework
Read Time: 10 minutes
Zero Tests to TDD - What I've Learned
A Little Background I’m usually a stickler for best practices, but automated testing is something that has eluded me in my professional career for a long time. I typically work on legacy, line of business applications. So automated testing was never a priority. I’ve tried and failed to introduce various development teams to automated testing. Legacy applications are inherently difficult to test. Most everything I’ve read about automated testing points to trivial examples of testing and something like add (1, 2) and making sure the output was 3.
Read more...