Пример #1
0
        public virtual ApiTeacherResponseModel MapBOToModel(
            BOTeacher boTeacher)
        {
            var model = new ApiTeacherResponseModel();

            model.SetProperties(boTeacher.Id, boTeacher.Birthday, boTeacher.Email, boTeacher.FirstName, boTeacher.LastName, boTeacher.Phone, boTeacher.StudioId);

            return(model);
        }
Пример #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiTeacherModelMapper();
            var model  = new ApiTeacherResponseModel();

            model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", 1);
            ApiTeacherRequestModel response = mapper.MapResponseToRequest(model);

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