示例#1
0
        public void NotificationRepository_DeleteById_ThrowsExceptionWhenIdNotFound()
        {
            //arrange
            INotificationRepo nr = GetInMemoryNotificationRepository();


            //assert
            Assert.ThrowsAny <ArgumentNullException>(() => nr.DeleteById(0));
        }
示例#2
0
        public void NotificationRepository_DeleteById_DeletesNotification()
        {
            //arrange
            INotificationRepo nr = GetInMemoryNotificationRepository();

            //act
            nr.Add(notification);
            nr.DeleteById(1); //NotificationId should be 1

            //assert
            Assert.ThrowsAny <ArgumentNullException>(() => nr.GetById(1));
        }