empathy management stories

Project empathy — day five – logic and the first test

Today felt productive, engaging, and like I finally made real progress.

Here is how the day went.

I created a new ProjectManager class to contain the logic for the project domain.

Since I am exposing the most straightforward functionality, I only added create and read methods, with creation only having a title as a required field.

Since I added new logic, I felt it pertinent to cover the logic under tests.

Luckily, the framework took care of a lot of the initialization items needed to test, such as 

  • In-memory DB
  • Seeding test data
  • Faking auths as various users
  • Dependency injection
  • Testing frameworks such as xunit and shouldly.
  • Sample tests to get you started

I can only imagine the amount of time it would have taken to set everything up to a point necessary to run a test.

With that note, I remember when I was getting started, I found the time required to set up tests quite challenging, especially when thinking about all the feature work I could be working on.

The learning here is that it isn’t enough to expect tests to be done. We need to dig deeper and embed within our teams the importance and value-added of having quality software.

Until next time.

Icons made by Freepik from www.flaticon.com