Blog.Logic.Core.Tests.EducationLogicTest.ShouldAddEducation C# (CSharp) Méthode

ShouldAddEducation() private méthode

private ShouldAddEducation ( ) : void
Résultat void
        public void ShouldAddEducation()
        {
            var dbResult = new Education
            {
                EducationId = 4,
                EducationType = new EducationType(),
                City = "Foo",
                State = "Bar",
                Country = "Baz",
                Course = "Fudge",
                UserId = 1,
                User = new User
                {
                    UserId = 1,
                    UserName = "FooBar"
                }
            };
            _educationRepository = new Mock<IEducationRepository>();
            _educationRepository.Setup(a => a.Add(It.IsAny<Education>())).Returns(dbResult);

            _educationLogic = new EducationLogic(_educationRepository.Object);

            var result = _educationLogic.Add(new Common.Contracts.Education
            {
                EducationId = 4,
                EducationType = new Common.Contracts.EducationType(),
                City = "Foo",
                State = "Bar",
                Country = "Baz",
                Course = "Fudge",
                UserId = 1
            });

            Assert.IsNotNull(result);
        }