public void MapResponseToRequest() { var mapper = new ApiPipelineStepStatuModelMapper(); var model = new ApiPipelineStepStatuResponseModel(); model.SetProperties(1, "A"); ApiPipelineStepStatuRequestModel response = mapper.MapResponseToRequest(model); response.Name.Should().Be("A"); }
public async void TestUpdate() { var builder = new WebHostBuilder() .UseEnvironment("Production") .UseStartup <TestStartup>(); TestServer testServer = new TestServer(builder); var client = new ApiClient(testServer.CreateClient()); ApiPipelineStepStatuResponseModel model = await client.PipelineStepStatuGetAsync(1); ApiPipelineStepStatuModelMapper mapper = new ApiPipelineStepStatuModelMapper(); UpdateResponse <ApiPipelineStepStatuResponseModel> updateResponse = await client.PipelineStepStatuUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); }