示例#1
0
        public void MapEFToBOList()
        {
            var     mapper = new DALTeacherMapper();
            Teacher entity = new Teacher();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", 1, "A", "A", 1);

            List <BOTeacher> response = mapper.MapEFToBO(new List <Teacher>()
            {
                entity
            });

            response.Count.Should().Be(1);
        }
示例#2
0
        public void MapEFToBO()
        {
            var     mapper = new DALTeacherMapper();
            Teacher entity = new Teacher();

            entity.SetProperties(DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", 1, "A", "A", 1);

            BOTeacher response = mapper.MapEFToBO(entity);

            response.Birthday.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.Email.Should().Be("A");
            response.FirstName.Should().Be("A");
            response.Id.Should().Be(1);
            response.LastName.Should().Be("A");
            response.Phone.Should().Be("A");
            response.UserId.Should().Be(1);
        }