Exemple #1
0
        public void TestIfDeletePublisherInvokesRemove()
        {
            publisherBusiness.Delete("AAA");

            mockDBSetPublishers.Verify(m => m.Remove(It.IsAny <Publisher>()), Times.Once());
            mockContext.Verify(m => m.SaveChanges(), Times.Once());
        }
Exemple #2
0
        private void Delete()
        {
            Console.WriteLine("Enter Publisher to delete: ");
            string publisherName = Console.ReadLine();

            publisherBusiness.Delete(publisherName);
            Console.WriteLine("Done.");
        }