@azagoskin
Software Architect, Staff Engineer
Software Architect, Staff Engineer | .NET, C#, microservices | Design and create scalable, high-load, fault tolerant and distributed backend services and Web APIs 👨🏼💻
Consultation and mentoring.
We may consider these things for testing: Happy path e.g. return value is correct / expected exception gets thrown / messages get published etc. All if-else-switch branches. Edge cases such as awkward input parameters (int.MaxValue/MinValue/0, long strings, nulls, empty strings etc). The order of method calls (e.g. validation goes before we save data to the database).
This article is supposed to be the last one in this short series. At the moment I’m working on an open source project which I’m going to blog about later on. The amount of work is rather decent so I’m afraid I don’t have ETA at that point. As for DI, routing and security, I prefer to cover these with integration tests. Nevertheless, the first two could be nicely covered by unit tests.