Beispiel #1
0
        public void SendMessage_WithInvalidPhoneNumber_ReturnsError(string phoneNumber)
        {
            // Arrange
            var twilioStub = new StubTwilioAdapter();
            var sms        = new SMS(twilioStub);

            // Act
            var result = sms.SendMessage(phoneNumber, "test");

            // Assert
            Assert.Contains("error", result.ToLower());
        }
Beispiel #2
0
        public void SendMessage_WithNullParamters_ReturnsError()
        {
            // Arrange
            var twilioStub = new StubTwilioAdapter();
            var sms        = new SMS(twilioStub);

            // Act
            var result = sms.SendMessage(null, null);

            // Assert
            Assert.Contains("error", result.ToLower());
        }