Skip to content

Conversation

@VectorTetra
Copy link
Contributor

No description provided.

@xperiandri xperiandri changed the title Implemented upload complex tests Implemented tests for file upload within an input object Oct 22, 2025
@xperiandri xperiandri requested a review from Copilot October 22, 2025 11:07
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds test coverage for file uploads within complex input objects. The changes implement four new test cases that verify file upload functionality using a complex input object structure (InputFile) rather than passing files directly.

Key Changes

  • Added UploadComplexOperation module with operation definition and validation logic
  • Implemented four test cases covering synchronous/asynchronous operations with/without context
  • Updated schema to properly handle file uploads within input objects by extracting the stream from the input object structure

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
LocalProviderWithOptionalParametersOnlyTests.fs Added new test module and four test cases for complex input object file uploads
LocalProviderTests.fs Added identical test module and test cases for complex input object file uploads
Schema.fs Modified InputFileObject type binding and updated file content extraction to use InputFile structure

[<Fact>]
let ``Should be able to upload file using complex input object`` () =
let file = { Name = "complex.txt"; ContentType = "text/plain"; Content = "Complex input object file content" }
let input = UploadComplexOperation.InputFile(file = file.MakeUpload())
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use F# class initializer syntax instead of property assignment. The code should be: UploadComplexOperation.InputFile(file = file.MakeUpload()) which is already correct, but ensure this pattern is consistently followed throughout.

Copilot generated this review using guidance from repository custom instructions.
[<Fact>]
let ``Should be able to upload file using complex input object`` () =
let file = { Name = "complex.txt"; ContentType = "text/plain"; Content = "Complex input object file content" }
let input = UploadComplexOperation.InputFile(file = file.MakeUpload())
Copy link

Copilot AI Oct 22, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use F# class initializer syntax instead of property assignment. The code should be: UploadComplexOperation.InputFile(file = file.MakeUpload()) which is already correct, but ensure this pattern is consistently followed throughout.

Copilot generated this review using guidance from repository custom instructions.
@xperiandri xperiandri enabled auto-merge (squash) October 22, 2025 11:11
@xperiandri xperiandri disabled auto-merge October 22, 2025 11:11
@xperiandri xperiandri merged commit f88cab6 into fsprojects:dev Oct 22, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants