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

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

            // act
            itemNotificationRepository.Save(notification);

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

            Assert.AreEqual(notification, returnedItemNotification);
        }
 public void SaveItemNotification(ItemNotification itemNotification)
 {
     itemNotificationRepository.Save(itemNotification);
 }