public void MapResponseToRequest() { var mapper = new ApiPipelineStepStatusModelMapper(); var model = new ApiPipelineStepStatusResponseModel(); model.SetProperties(1, "A"); ApiPipelineStepStatusRequestModel response = mapper.MapResponseToRequest(model); response.Name.Should().Be("A"); }
public void MapClientRequestToResponse() { var mapper = new ApiPipelineStepStatusModelMapper(); var model = new ApiPipelineStepStatusClientRequestModel(); model.SetProperties("A"); ApiPipelineStepStatusClientResponseModel response = mapper.MapClientRequestToResponse(1, model); response.Should().NotBeNull(); response.Name.Should().Be("A"); }
public async void TestUpdate() { var model = await this.CreateRecord(); ApiPipelineStepStatusModelMapper mapper = new ApiPipelineStepStatusModelMapper(); UpdateResponse <ApiPipelineStepStatusResponseModel> updateResponse = await this.Client.PipelineStepStatusUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }
public void CreatePatch() { var mapper = new ApiPipelineStepStatusModelMapper(); var model = new ApiPipelineStepStatusRequestModel(); model.SetProperties("A"); JsonPatchDocument <ApiPipelineStepStatusRequestModel> patch = mapper.CreatePatch(model); var response = new ApiPipelineStepStatusRequestModel(); patch.ApplyTo(response); response.Name.Should().Be("A"); }