Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
34 lines (30 sloc) 841 Bytes
using System;
using Framework.Implementations;
using Framework.Interfaces;
using Framework.Models;
using NUnit.Framework;
namespace UnitTests
{
[TestFixture]
public class EmailTests
{
private readonly IEmailService _emailService;
public EmailTests()
{
_emailService = new GmailEmailService();
}
[Test]
public void send_email_via_gmail()
{
var email = new EmailMessage
{
IsHtml = false,
Subject = "Gmail unit test email",
ToEmail = "your.test.email@gmail.com",
Body = String.Format("Gmail unit test body sent at {0:D}", DateTime.Now)
};
var success = _emailService.SendEmailMessage(email);
Assert.IsTrue(success);
}
}
}