Example #1
0
        public void MapBOToModelList()
        {
            var       mapper = new BOLTeacherMapper();
            BOTeacher bo     = new BOTeacher();

            bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", 1);
            List <ApiTeacherResponseModel> response = mapper.MapBOToModel(new List <BOTeacher>()
            {
                { bo }
            });

            response.Count.Should().Be(1);
        }
Example #2
0
        public void MapBOToModel()
        {
            var       mapper = new BOLTeacherMapper();
            BOTeacher bo     = new BOTeacher();

            bo.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", 1);
            ApiTeacherResponseModel response = mapper.MapBOToModel(bo);

            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);
        }