public void TestGetMessages()
        {
            //setup
            var license = License.FromXml(TestLicense.Load("LicenseGood.xml"));
            var notification = new GracePeriodNotification(license, _mockConfiguration.Object);

            //act
            var messages = notification.CreateMailMessages();

            //assert
            Assert.IsNotNull(messages);
            Assert.AreEqual(2, messages.Count());

            //there should be an email to the client address
            var clientMessage = messages.SingleOrDefault(m => m.To.Select(a => a.Address).Contains(DevClientEmail));
            Assert.IsNotNull(clientMessage);
            Assert.AreEqual(DevSenderEmail, clientMessage.From.Address);
            Assert.IsNotNullOrEmpty(clientMessage.Subject);
            Assert.AreEqual(DevGracePeriodEmailClientTemplate, clientMessage.Body);
            //there should be an email to the owner
            var ownerMessage = messages.SingleOrDefault(m => m.To.Select(a => a.Address).Contains(DevOwnerEmail));
            Assert.IsNotNull(ownerMessage);
            Assert.AreEqual(DevSenderEmail, ownerMessage.From.Address);
            Assert.IsNotNullOrEmpty(ownerMessage.Subject);
            Assert.AreEqual(DevGracePerdioEmailOwnerTemplate, ownerMessage.Body);
        }
        public void TestCreate()
        {
            //setup
            var license = License.FromXml(TestLicense.Load("LicenseGood.xml"));

            //act
            var notification = new GracePeriodNotification(license, _mockConfiguration.Object);
        }
 public void TestCreate_NullLicense()
 {
     //act
     var notification = new GracePeriodNotification(null, _mockConfiguration.Object);
 }
 public void TestCreate_NullConfig()
 {
     //act
     var notification = new GracePeriodNotification(null, null);
 }