public void MapResponseToRequest() { var mapper = new ApiOtherTransportModelMapper(); var model = new ApiOtherTransportResponseModel(); model.SetProperties(1, 1, 1); ApiOtherTransportRequestModel response = mapper.MapResponseToRequest(model); response.HandlerId.Should().Be(1); response.PipelineStepId.Should().Be(1); }
public async void TestUpdate() { var model = await this.CreateRecord(); ApiOtherTransportModelMapper mapper = new ApiOtherTransportModelMapper(); UpdateResponse <ApiOtherTransportResponseModel> updateResponse = await this.Client.OtherTransportUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }
public void CreatePatch() { var mapper = new ApiOtherTransportModelMapper(); var model = new ApiOtherTransportRequestModel(); model.SetProperties(1, 1); JsonPatchDocument <ApiOtherTransportRequestModel> patch = mapper.CreatePatch(model); var response = new ApiOtherTransportRequestModel(); patch.ApplyTo(response); response.HandlerId.Should().Be(1); response.PipelineStepId.Should().Be(1); }