feat(message): map generic template attachments#1657
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughAdds support for Facebook "generic template" message attachments: a new Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@src/test/java/com/restfb/types/MessageTest.java`:
- Around line 98-119: The test messageWithGenericTemplateAttachment in
MessageTest verifies the generic-template success path but lacks a negative
assertion for non-generic attachments; update the test to also assert the false
branch by checking another attachment (or the same attachment when applicable)
using attachment.isGenericTemplate() == false for a non-generic case or by
creating/reading a known non-generic fixture from jsonFromClasspath and
asserting its attachment.isGenericTemplate() is false and related getters (e.g.,
getGenericTemplate()) are null to cover the failure path; refer to the
MessageTest class and the messageWithGenericTemplateAttachment method, and the
Attachment methods isGenericTemplate(), getGenericTemplate(), and
getAttachments() to locate where to add the assertion.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: fd838f53-9a50-48bc-bf9d-8d73b2f3a00a
📒 Files selected for processing (3)
src/main/lombok/com/restfb/types/Message.javasrc/test/java/com/restfb/types/MessageTest.javasrc/test/resources/json/v10_0/message-with-generic-template.json
Summary by CodeRabbit
New Features
Tests