Skip to content

fix: file creation validation and error handling in DefaultCreateFile…#40

Merged
jhonatapers merged 1 commit intodevelopfrom
fix/store-content
May 31, 2025
Merged

fix: file creation validation and error handling in DefaultCreateFile…#40
jhonatapers merged 1 commit intodevelopfrom
fix/store-content

Conversation

@jhonatapers
Copy link
Copy Markdown
Member

This pull request enhances file creation functionality by improving validation and exception handling in the DefaultCreateFileUseCase class and updating its corresponding test suite. Key changes include stricter validation for file names, enhanced quota checks, and additional test cases to cover new scenarios.

Enhancements to validation and exception handling:

Test suite improvements:

  • Added test cases to validate new scenarios, including:
    • Invalid member ID leading to a NotFoundException.
    • Invalid file names (e.g., reserved names like "NUL") causing a ValidationException.
    • Quota exceeded scenarios resulting in a QuotaExceededException.
    • Null content type causing a ValidationException.
  • Renamed test methods for clarity, such as changing givenAnInvalidId_whenCallsExecute_thenShouldThrowNotFoundException to givenAnInvalidFolderId_whenCallsExecute_thenShouldThrowNotFoundException.

Code cleanup:

@jhonatapers jhonatapers self-assigned this May 31, 2025
@jhonatapers jhonatapers added the bug Something isn't working label May 31, 2025
@jhonatapers jhonatapers merged commit 5386dc8 into develop May 31, 2025
@github-project-automation github-project-automation Bot moved this to Done in CallV2 May 31, 2025
@jhonatapers jhonatapers deleted the fix/store-content branch May 31, 2025 16:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant