public void IsReadIsTrue() { var exhibitCommand = new Create.Command { GenreId = 1, UserId = "id", Location = "aperture gallery", DateTime = DateTime.Today, ImageUrl = "url" }; var user = new ApplicationUser { Email = _testUsername, Name = _testName, ImageUrl = _testImageUrl }; var exhibit = Exhibit.Create(exhibitCommand); var notification = Notification.ExhibitCreated(exhibit); var userNotification = UserNotification.Create(user, notification); userNotification.Read(); Assert.Equal(_testIsRead, userNotification.IsRead); }
public static UserNotification Create( Model.User.User user, string title, string content, UserNotificationType type = UserNotificationType.Info ) { return(Find(UserNotification.Create(user, title, content, type))); }