public async void TestUpdate() { var model = await this.CreateRecord(); ApiLibraryVariableSetModelMapper mapper = new ApiLibraryVariableSetModelMapper(); UpdateResponse <ApiLibraryVariableSetResponseModel> updateResponse = await this.Client.LibraryVariableSetUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }
public void MapResponseToRequest() { var mapper = new ApiLibraryVariableSetModelMapper(); var model = new ApiLibraryVariableSetResponseModel(); model.SetProperties("A", "A", "A", "A", "A"); ApiLibraryVariableSetRequestModel response = mapper.MapResponseToRequest(model); response.ContentType.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.VariableSetId.Should().Be("A"); }
public void CreatePatch() { var mapper = new ApiLibraryVariableSetModelMapper(); var model = new ApiLibraryVariableSetRequestModel(); model.SetProperties("A", "A", "A", "A"); JsonPatchDocument <ApiLibraryVariableSetRequestModel> patch = mapper.CreatePatch(model); var response = new ApiLibraryVariableSetRequestModel(); patch.ApplyTo(response); response.ContentType.Should().Be("A"); response.JSON.Should().Be("A"); response.Name.Should().Be("A"); response.VariableSetId.Should().Be("A"); }