🧪 [testing improvement] Add tests for EdgeTrafficPermissionResolver#250
Conversation
Adds a comprehensive xUnit test file covering all public methods: - Resolve - GetAllowedCapacity - BuildInitialRemainingAllowances - FormatSummary Covers null checks, percentage limitations, overrides vs network defaults, and infinity edge cases.
|
👋 Jules, reporting for duty! I'm here to lend a hand with this pull request. When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down. I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job! For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with New to Jules? Learn more at jules.google/docs. For security, I will only act on instructions from the user who triggered this task. |
🎯 What: The
EdgeTrafficPermissionResolverclass lacked any test coverage. This PR adds a comprehensive xUnit test file (EdgeTrafficPermissionResolverTests.cs) to fill this testing gap.📊 Coverage: The tests cover all public methods of the resolver:
Resolve(including null argument checks, edge overrides, network defaults, and implicit permit fallbacks)GetAllowedCapacity(including behavior for Blocked, Limited Absolute, Limited Percentage limits, and Permitted infinity bounds)BuildInitialRemainingAllowances(verifying dictionary construction, unique traffic types, and deduction of existing occupations)FormatSummary(validating string format outputs for various permission modes)✨ Result: A significant improvement in test coverage. The
EdgeTrafficPermissionResolverlogic is now fully verified against regressions, providing a strong safety net for future refactoring of routing logic. Note that this PR also included a dependency update forSkiaSharp.NativeAssets.Linux.NoDependenciesin the test project specifically to avoid unrelatedlibSkiaSharp.soloading exceptions when running the tests.PR created automatically by Jules for task 10440420179962647 started by @wnj00524