gordon-cs / Project-Phoenix

The Electronic Room Condition Inventory
0 stars 0 forks source link

Phoenix: The missing Tests #184

Closed eanyanwu closed 6 years ago

eanyanwu commented 6 years ago

I am starting with writing the Unit Tests for the Data Access Layer. Since I want to test the Dal against an actual database, I'm having the tests create a fake db on the fly before the Dal tests are run. You can see this done in DatabaseFixture.

As a plus, I introduced Dependency Injection so that our classes become more testable. This is being rolled out slowly.

I am also gradually getting rid of Entity Framework from the "services". This time, I was able to get rid of it from the Login Service. While doing so, I also managed to reduce the number of calls to the database, thus increasing login speed 🐉

Things are still messy-ish, but we are getting there...more to come.