Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

(#217) Added dynamic proxies tests, plus some Cosmos test fixes. #303

Merged
merged 1 commit into from
Feb 28, 2025

Conversation

adrianhall
Copy link
Collaborator

Closes #217

@adrianhall adrianhall added this to the 9.0.1 milestone Feb 28, 2025
@adrianhall adrianhall requested a review from Copilot February 28, 2025 19:13
@adrianhall adrianhall self-assigned this Feb 28, 2025

Choose a reason for hiding this comment

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

PR Overview

This PR adds additional tests for dynamic proxies and Cosmos DB integration while refactoring and cleaning up unused usings.

  • Added tests for dynamic proxies to validate offline context behavior.
  • Introduced new Cosmos Table Data tests and refactored the PackedKeyOptions for improved ID parsing.
  • Removed unused using directives across several files to improve clarity.

Reviewed Changes

File Description
tests/CommunityToolkit.Datasync.Server.CosmosDb.Test/CosmosTableData_Tests.cs Adds tests for Cosmos table data conversion and equality.
tests/CommunityToolkit.Datasync.Client.Test/Offline/DynamicProxies_Tests.cs Introduces tests to verify dynamic proxy support in offline database operations.
tests/CommunityToolkit.Datasync.Server.CosmosDb.Test/Options/PackedKeyOptions.cs Refactors the options class with concise constructor syntax and updates ID parsing.
tests/CommunityToolkit.Datasync.Server.CosmosDb.Test/PackedKeyRepository_Tests.cs Updates ID parsing logic and removes unused using directives.
tests/CommunityToolkit.Datasync.Server.CosmosDb.Test/CosmosDbRepository_Tests.cs Removes unused using directives and applies minor formatting adjustments.
src/CommunityToolkit.Datasync.Server.CosmosDb/CosmosTableData.cs Removes unused using directives.
tests/CommunityToolkit.Datasync.Server.CosmosDb.Test/Models/CosmosDbMovie.cs Cleans up redundant using directives.

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

Comments suppressed due to low confidence (2)

tests/CommunityToolkit.Datasync.Server.CosmosDb.Test/Options/PackedKeyOptions.cs:30

  • [nitpick] Consider providing more context in the exception message for failed ID parsing (e.g., include the invalid input) to aid debugging.
if (!int.TryParse(parts[1], out int year))

tests/CommunityToolkit.Datasync.Server.CosmosDb.Test/CosmosTableData_Tests.cs:18

  • [nitpick] The class name 'CCosmosTableData' may be unclear; consider renaming it to a more descriptive identifier (e.g., 'TestCosmosTableData').
CCosmosTableData entity_a = a.ToTableEntity<CCosmosTableData>();
@adrianhall adrianhall merged commit 0595fd8 into CommunityToolkit:main Feb 28, 2025
5 checks passed
@adrianhall adrianhall deleted the issues/217 branch February 28, 2025 19:16
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.

Add related entity tests within client test suite
1 participant