public void MapResponseToRequest() { var mapper = new ApiEventRelatedDocumentModelMapper(); var model = new ApiEventRelatedDocumentResponseModel(); model.SetProperties(1, "A", "A"); ApiEventRelatedDocumentRequestModel response = mapper.MapResponseToRequest(model); response.EventId.Should().Be("A"); response.RelatedDocumentId.Should().Be("A"); }
public async void TestUpdate() { var model = await this.CreateRecord(); ApiEventRelatedDocumentModelMapper mapper = new ApiEventRelatedDocumentModelMapper(); UpdateResponse <ApiEventRelatedDocumentResponseModel> updateResponse = await this.Client.EventRelatedDocumentUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }
public void CreatePatch() { var mapper = new ApiEventRelatedDocumentModelMapper(); var model = new ApiEventRelatedDocumentRequestModel(); model.SetProperties("A", "A"); JsonPatchDocument <ApiEventRelatedDocumentRequestModel> patch = mapper.CreatePatch(model); var response = new ApiEventRelatedDocumentRequestModel(); patch.ApplyTo(response); response.EventId.Should().Be("A"); response.RelatedDocumentId.Should().Be("A"); }