public async void TestUpdate() { var model = await this.CreateRecord(); ApiDeploymentProcessModelMapper mapper = new ApiDeploymentProcessModelMapper(); UpdateResponse <ApiDeploymentProcessResponseModel> updateResponse = await this.Client.DeploymentProcessUpdateAsync(model.Id, mapper.MapResponseToRequest(model)); updateResponse.Record.Should().NotBeNull(); updateResponse.Success.Should().BeTrue(); await this.Cleanup(); }
public void MapResponseToRequest() { var mapper = new ApiDeploymentProcessModelMapper(); var model = new ApiDeploymentProcessResponseModel(); model.SetProperties("A", true, "A", "A", "A", 1); ApiDeploymentProcessRequestModel response = mapper.MapResponseToRequest(model); response.IsFrozen.Should().Be(true); response.JSON.Should().Be("A"); response.OwnerId.Should().Be("A"); response.RelatedDocumentIds.Should().Be("A"); response.Version.Should().Be(1); }
public void CreatePatch() { var mapper = new ApiDeploymentProcessModelMapper(); var model = new ApiDeploymentProcessRequestModel(); model.SetProperties(true, "A", "A", "A", 1); JsonPatchDocument <ApiDeploymentProcessRequestModel> patch = mapper.CreatePatch(model); var response = new ApiDeploymentProcessRequestModel(); patch.ApplyTo(response); response.IsFrozen.Should().Be(true); response.JSON.Should().Be("A"); response.OwnerId.Should().Be("A"); response.RelatedDocumentIds.Should().Be("A"); response.Version.Should().Be(1); }