Blog.Logic.Core.Tests.EducationLogicTest.ShouldThrowExceptionWhenAddEducationFails C# (CSharp) Method

ShouldThrowExceptionWhenAddEducationFails() private method

private ShouldThrowExceptionWhenAddEducationFails ( ) : void
return void
        public void ShouldThrowExceptionWhenAddEducationFails()
        {
            _educationRepository = new Mock<IEducationRepository>();
            _educationRepository.Setup(a => a.Add(It.IsAny<Education>())).Throws(new Exception());

            _educationLogic = new EducationLogic(_educationRepository.Object);

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