Refactor ScriptingUtilsTest to include value assertions for JSON deserialization#2957
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)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThis PR tightens tests in ScriptingUtilsTest: adds a static ChangesJSON Binding Test Assertions
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested reviewers
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 |
|
/ok-to-test |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@core/src/test/java/com/predic8/membrane/core/lang/ScriptingUtilsTest.java`:
- Around line 52-55: The number() test in ScriptingUtilsTest currently only
asserts the type returned by createBinding("7").get("json"); update the test to
also assert the actual numeric value for consistency — call
createBinding("7").get("json") and add an assertEquals(Integer.valueOf(7), ...)
(or simply assertEquals(7, ((Integer) ...).intValue())) alongside the existing
assertInstanceOf to verify the value is 7; locate this in the ScriptingUtilsTest
class and modify the number() test that references createBinding and the "json"
key.
🪄 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: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: b422d03e-1394-4246-be6e-930fe8d1fd18
📒 Files selected for processing (1)
core/src/test/java/com/predic8/membrane/core/lang/ScriptingUtilsTest.java
|
This pull request needs "/ok-to-test" from an authorized committer. |
… deserialization
Summary by CodeRabbit