Blog.Logic.Core.Tests.EducationLogicTest.ShouldThrowExceptionWhenUpdateEducationFails C# (CSharp) 메소드

ShouldThrowExceptionWhenUpdateEducationFails() 개인적인 메소드

private ShouldThrowExceptionWhenUpdateEducationFails ( ) : void
리턴 void
        public void ShouldThrowExceptionWhenUpdateEducationFails()
        {
            _educationRepository = new Mock<IEducationRepository>();
            _educationRepository.Setup(a => a.Edit(It.IsAny<Education>())).Throws(new Exception());

            _educationLogic = new EducationLogic(_educationRepository.Object);

            Assert.Throws<BlogException>(() => _educationLogic.Update(new Common.Contracts.Education()));
        }