コード例 #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));
        }