Home / Companies / Twilio / Blog / Post Details
Content Deep Dive

Unit Testing Twilio Programmable SMS in .NET Core with xUnit, Moq, and Visual Studio 2019

Blog post from Twilio

Post Details
Company
Date Published
Author
Mitchel Sellers
Word Count
5,669
Language
English
Hacker News Points
-
Summary

A .NET Core console application is used to send SMS messages using Twilio Programmable SMS. The application uses the Twilio helper library for .NET Core and stores its credentials securely as environment variables. It also sets up dependency injection using the .NET Core service provider. Additionally, it creates a test project and builds unit tests with the xUnit framework, including creating mocks for the SMS service using the Moq library. The application demonstrates how to use Twilio Programmable SMS in a real-world scenario and provides a foundation for learning about unit testing and dependency injection in .NET Core.