예제 #1
0
        public virtual ApiAdminResponseModel MapBOToModel(
            BOAdmin boAdmin)
        {
            var model = new ApiAdminResponseModel();

            model.SetProperties(boAdmin.Id, boAdmin.Email, boAdmin.FirstName, boAdmin.LastName, boAdmin.Password, boAdmin.Phone, boAdmin.Username);

            return(model);
        }
예제 #2
0
        public virtual ApiAdminResponseModel MapBOToModel(
            BOAdmin boAdmin)
        {
            var model = new ApiAdminResponseModel();

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

            return(model);
        }
예제 #3
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiAdminModelMapper();
            var model  = new ApiAdminResponseModel();

            model.SetProperties(1, DateTime.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", 1);
            ApiAdminRequestModel 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.StudioId.Should().Be(1);
        }
예제 #4
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiAdminModelMapper();
            var model  = new ApiAdminResponseModel();

            model.SetProperties(1, "A", "A", "A", "A", "A", "A");
            ApiAdminRequestModel response = mapper.MapResponseToRequest(model);

            response.Email.Should().Be("A");
            response.FirstName.Should().Be("A");
            response.LastName.Should().Be("A");
            response.Password.Should().Be("A");
            response.Phone.Should().Be("A");
            response.Username.Should().Be("A");
        }