Thank G-d for Unit Tests

Nov 29, 2016 17:33


Originally published at www.ikriv.com. Please leave any comments there.

If anyone tells you unit tests are a waste of time, send them to this post.

I am in the middle of some major refactoring of our bills generator. Billing, you know, is full of lots of not-so-obvious details. E.g. I have just caught a bug where I kept only internal users instead of throwing them out and keeping only external users. Your regular ‘missing one character’ error that is almost impossible to spot by just looking at the code.

Subscriptions = Usage.Subscriptions
.Where(s=>!checker.IsUserInternalToProduct(s.User, InternalUsers))
.ToArray();

software development, c#

Previous post Next post
Up