コード例 #1
0
        public void Get_DataCorrect_GotNotifications()
        {
            var user = UserFaker.Create();

            var title = "test title";

            var content = "content here";

            Assert.Zero(UserNotificationRepository.Get(user).Length);

            UserNotificationRepository.Create(user, title, content, UserNotificationType.Warning);

            var notifications = UserNotificationRepository.Get(user);

            Assert.AreEqual(1, notifications.Length);

            Assert.AreEqual(title, notifications[0].title);
            Assert.AreEqual(content, notifications[0].content);
        }
コード例 #2
0
 public static UserNotification[] GetActive(User user)
 {
     return(UserNotificationRepository.Get(user));
 }