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

ShouldThrowExceptionWhenGetEducationByUserFails() private method

private ShouldThrowExceptionWhenGetEducationByUserFails ( ) : void
return void
        public void ShouldThrowExceptionWhenGetEducationByUserFails()
        {
            _educationRepository = new Mock<IEducationRepository>();
            _educationRepository.Setup(a => a.Find(It.IsAny<Expression<Func<Education, bool>>>(), true))
                .Throws(new Exception());

            _educationLogic = new EducationLogic(_educationRepository.Object);
            Assert.Throws<BlogException>(() => _educationLogic.GetByUser(1));
        }