public virtual ApiProjectResponseModel MapBOToModel( BOProject boProject) { var model = new ApiProjectResponseModel(); model.SetProperties(boProject.Id, boProject.AutoCreateRelease, boProject.DataVersion, boProject.DeploymentProcessId, boProject.DiscreteChannelRelease, boProject.IncludedLibraryVariableSetIds, boProject.IsDisabled, boProject.JSON, boProject.LifecycleId, boProject.Name, boProject.ProjectGroupId, boProject.Slug, boProject.VariableSetId); return(model); }
public void MapResponseToRequest() { var mapper = new ApiProjectModelMapper(); var model = new ApiProjectResponseModel(); model.SetProperties("A", true, BitConverter.GetBytes(1), "A", true, "A", true, "A", "A", "A", "A", "A", "A"); ApiProjectRequestModel response = mapper.MapResponseToRequest(model); response.AutoCreateRelease.Should().Be(true); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.DeploymentProcessId.Should().Be("A"); response.DiscreteChannelRelease.Should().Be(true); response.IncludedLibraryVariableSetIds.Should().Be("A"); response.IsDisabled.Should().Be(true); response.JSON.Should().Be("A"); response.LifecycleId.Should().Be("A"); response.Name.Should().Be("A"); response.ProjectGroupId.Should().Be("A"); response.Slug.Should().Be("A"); response.VariableSetId.Should().Be("A"); }