コード例 #1
0
        public virtual ApiClientCommunicationResponseModel MapBOToModel(
            BOClientCommunication boClientCommunication)
        {
            var model = new ApiClientCommunicationResponseModel();

            model.SetProperties(boClientCommunication.Id, boClientCommunication.ClientId, boClientCommunication.DateCreated, boClientCommunication.EmployeeId, boClientCommunication.Note);

            return(model);
        }
コード例 #2
0
        public void MapResponseToRequest()
        {
            var mapper = new ApiClientCommunicationModelMapper();
            var model  = new ApiClientCommunicationResponseModel();

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

            response.ClientId.Should().Be(1);
            response.DateCreated.Should().Be(DateTime.Parse("1/1/1987 12:00:00 AM"));
            response.EmployeeId.Should().Be(1);
            response.Notes.Should().Be("A");
        }