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

ShouldThrowExceptionWhenGetEducationByUserFails() 개인적인 메소드

private ShouldThrowExceptionWhenGetEducationByUserFails ( ) : void
리턴 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));
        }