This is the first of a series of short videos about adding tests to already exsiting software.
For this videos I picked an interesting Micro ORM project called Debonair, you can find more info about the project in the Github repo.
The project was developed by James Studdart with a clear goal
The goal of debonair is to take things back to basics, providing quick data access, while stopping you (the developer) attempting to make the orm do the heavy lifting that should be done by the database. The likes of Entity Framework and Linq2SQL are great, but are very slow, produce horrible sql and let you do a lot of stuff that you really shouldn’t be doing.
During the video I’ll be adding some assertions to a list of tests that where there but didn’t have the assertions (so they didn’t actually check anything).
Why choosing Debonair
for two reasons:
- It’s well done: I don’t have to break too many dependencies in order to add tests. I already do this all day at work and it’s not fun.
- It deals with databases: an objection that I always get when talking about adding test to a project is “but my software saves things to the database, your tests wouldn’t work”. Here I try to demonstrate how you can add tests also to projects that have difficult external dependencies.
In the nest video I’ll start adding unit tests to the classes by doing some interesting refactorings in order to help me break some dependencies.
Author: Daniele Pozzobon
Daniele is an aspiring software craftsman and Scrum Master with more that ten years of experience in the software industry.
He is currently working on amazing solutions in the manufacturing industry helping with the development of a DevOps culture.
He constantly annoys his friends by talking about software and is passionate about Agile methodologies and DevOps, which gives him more opportunities to talk annoy his friends even more.
When there are no friends around to annoy, he blogs on CodeCleaners and in his free he time loves go hiking with his wife and two daughters.