Add configurable entity set name resolution#40
Conversation
Up to standards ✅🟢 Issues
|
| Metric | Results |
|---|---|
| Complexity | 5 |
| Duplication | 0 |
AI Reviewer: first review requested successfully. AI can make mistakes. Always validate suggestions.
TIP This summary will be updated as you push new changes.
There was a problem hiding this comment.
Pull Request Overview
The PR successfully implements the EntitySetNameResolver in ODataClientOptions, allowing for custom type-to-entity-set mapping. The implementation correctly prioritizes the custom resolver over existing attribute and pluralization conventions. Documentation in the README has been updated to reflect these changes.
While the core functionality and documentation are complete, there is a gap in the unit test coverage. Specifically, the scenario where the resolver returns null to trigger a fallback to default pluralization logic is not explicitly tested. All other acceptance criteria appear to be met.
About this PR
- The test suite does not currently include a scenario to verify that the system falls back to default pluralization logic when the custom resolver returns null. It is recommended to add this unit test to ensure full compliance with the fallback requirements.
Test suggestions
- Custom resolver provides a name, overriding all conventions
- Custom resolver returns whitespace, falling back to [EntitySet] attribute
- Custom resolver returns null, falling back to default pluralization logic
Prompt proposal for missing tests
Consider implementing these tests if applicable:
1. Custom resolver returns null, falling back to default pluralization logic
TIP Improve review quality by adding custom instructions
TIP How was this review? Give us feedback
fa59e24 to
a0b11d9
Compare
Summary
EntitySetNameResolverto resolve entity-set names for parameterlessFor<T>()calls.[EntitySet]and pluralization conventions when the resolver returnsnull, empty, or whitespace.Validation
dotnet build PanoramicData.OData.Client.Test/PanoramicData.OData.Client.Test.csproj --no-restoredotnet vstest PanoramicData.OData.Client.Test/bin/Debug/net10.0/PanoramicData.OData.Client.Test.dll --TestCaseFilter:"FullyQualifiedName~UnitTests"(700 passed)