public async void TestUpdate() { var model = await this.CreateRecord(); ApiLifecycleModelMapper mapper = new ApiLifecycleModelMapper(); UpdateResponse <ApiLifecycleResponseModel> updateResponse = await this.Client.LifecycleUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }
public void CreatePatch() { var mapper = new ApiLifecycleModelMapper(); var model = new ApiLifecycleRequestModel(); model.SetProperties(BitConverter.GetBytes(1), "A", "A"); JsonPatchDocument <ApiLifecycleRequestModel> patch = mapper.CreatePatch(model); var response = new ApiLifecycleRequestModel(); patch.ApplyTo(response); response.DataVersion.Should().BeEquivalentTo(BitConverter.GetBytes(1)); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); }