public virtual ApiDeploymentResponseModel MapBOToModel( BODeployment boDeployment) { var model = new ApiDeploymentResponseModel(); model.SetProperties(boDeployment.Id, boDeployment.ChannelId, boDeployment.Created, boDeployment.DeployedBy, boDeployment.DeployedToMachineIds, boDeployment.EnvironmentId, boDeployment.JSON, boDeployment.Name, boDeployment.ProjectGroupId, boDeployment.ProjectId, boDeployment.ReleaseId, boDeployment.TaskId, boDeployment.TenantId); return(model); }
public void MapResponseToRequest() { var mapper = new ApiDeploymentModelMapper(); var model = new ApiDeploymentResponseModel(); model.SetProperties("A", "A", DateTimeOffset.Parse("1/1/1987 12:00:00 AM"), "A", "A", "A", "A", "A", "A", "A", "A", "A", "A"); ApiDeploymentRequestModel response = mapper.MapResponseToRequest(model); response.ChannelId.Should().Be("A"); response.Created.Should().Be(DateTimeOffset.Parse("1/1/1987 12:00:00 AM")); response.DeployedBy.Should().Be("A"); response.DeployedToMachineIds.Should().Be("A"); response.EnvironmentId.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.ProjectGroupId.Should().Be("A"); response.ProjectId.Should().Be("A"); response.ReleaseId.Should().Be("A"); response.TaskId.Should().Be("A"); response.TenantId.Should().Be("A"); }