public void HasOneExpiringSubscriptionUserOn3DaysNotice() { var manager = new SubscriptionExpirationManager(userRepository, subscriptionRepository, loginRepository); var res = manager.GetEmailListOfSoonToBeExpiredSubscription(3); Assert.NotNull(res); Assert.AreEqual(1, res.Count()); }
public void HasTwoExpiringSubscriptionUserOnOneMonthNotice() { var manager = new SubscriptionExpirationManager(userRepository, subscriptionRepository, loginRepository); var res = manager.GetEmailListOfSoonToBeExpiredSubscription(30); Assert.NotNull(res); Assert.AreEqual(2, res.Count()); Assert.IsTrue(res.Any(email => email == "*****@*****.**")); Assert.IsTrue(res.Any(email => email == "*****@*****.**")); Assert.IsTrue(res.All(email => email != "*****@*****.**")); }