public async void TestUpdate() { var model = await this.CreateRecord(); ApiFeedModelMapper mapper = new ApiFeedModelMapper(); UpdateResponse <ApiFeedResponseModel> updateResponse = await this.Client.FeedUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }
public void MapResponseToRequest() { var mapper = new ApiFeedModelMapper(); var model = new ApiFeedResponseModel(); model.SetProperties("A", "A", "A", "A", "A"); ApiFeedRequestModel response = mapper.MapResponseToRequest(model); response.FeedType.Should().Be("A"); response.FeedUri.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiFeedModelMapper(); var model = new ApiFeedRequestModel(); model.SetProperties("A", "A", "A", "A"); JsonPatchDocument <ApiFeedRequestModel> patch = mapper.CreatePatch(model); var response = new ApiFeedRequestModel(); patch.ApplyTo(response); response.FeedType.Should().Be("A"); response.FeedUri.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }