Exemple #1
0
        public void ShoulUpdateItemNotification()
        {
            // arrange
            Item             item         = PrepareItem("name", "descritpion", TODAY, false);
            ItemNotification notification = PrepareItemNotification(item, TODAY, false);

            dbContext.Items.Add(item);
            dbContext.ItemNotifications.Add(notification);
            dbContext.SaveChanges();

            // act
            notification.Notified = true;
            itemNotificationRepository.Update(notification);

            // assert
            ItemNotification returnedItemNotification = itemNotificationRepository.FindByItemId(item.Id);

            Assert.AreEqual(true, returnedItemNotification.Notified);
        }
 private void UpdateNotificationStatus(ItemNotification notification)
 {
     notification.Notified = true;
     itemNotificationRepository.Update(notification);
 }