public void SetUp() { notification = new OneTimeEventNotification { Name = "Test notification" }; }
public void AddNotification_PassOneTimeEventNotification_ShouldSaveThisNotification() { var notification = new OneTimeEventNotification { Name = "Test name", Description = "Test description", SendingHour = 8 }; _notificationRepository.AddNotification(notification); _notificationRepository.Save(); var result = _context.Notifications.Count(); Assert.AreEqual(1, result); }
public void AddNotification_PassOneTimeEventNotificationWithFutureDateProperty_ShouldSaveThisProperty() { DateTime futureDate = DateTime.Now.AddDays(3); var notification = new OneTimeEventNotification { Name = "Test name", Description = "Test description", SendingHour = 8, FutureEventDate = futureDate, IsActive = true }; _notificationRepository.AddNotification(notification); _notificationRepository.Save(); var result = _notificationRepository.GetNotification(notification.NotificationId) as OneTimeEventNotification; Assert.AreEqual(futureDate, result.FutureEventDate); }