Sign in

Software Engineer interested in DevOps culture, cloud and distributed systems, Microservices, and resilient APIs. Passionate learner, creative and curious.

And what they are supposed to do…

Introduction

Software Engineering is a vast knowledge area, always moving forward. However, developing good software is an arduous task until now. Furthermore, to achieve software of quality easier, engineers keep investigating common problems to design patterns solving then. As results, we have many known Design Patterns and Software Development Principles to make developers focus as much as possible on the client’s needs.

On the other hand, these principles and patterns are not well comprehended and applied by developers at the very beginning of their career, and even experienced ones can sometimes misuse or wrongly pick up some of those patterns.

This…


Testing e-mail content in .NET without sending via SMTP. A FakeSMTP approach, thanks to Dependency injection.

When developing an application, we might face plenty of scenarios where dispatching an e-mail is required, maybe to warn a customer that something happened, alert some critical feature failure, send messages with attached files, several reasons indeed.

But while developing correlated e-mail features, It’s not a good idea to use a real SMTP client dispatching annoying test e-mails to somebody’s inbox, not even your’s.

This article will describe a Fake SMTP approach using the Dependency Injection pattern and Unit Test to help you test your e-mail contents.

Dependency Injection

To fully understand what is presented here, we expected you to be familiar…

Ícaro Torres

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store