Add unit tests for shared reference instance serialization - #86
Conversation
Added DuplicateInstanceContainer, SharedClassItem, and SharedClassNested models along with a SharedReferenceInstancesRoundTrip unit test to verify serialization and view reading for shared reference type instances.
|
👋 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. |
| Foo = sharedItem, | ||
| Bar = sharedItem, | ||
| Baz = sharedItem, |
There was a problem hiding this comment.
Expect more complex test condition.
- Foo and Bar share instance.
- Baz donesn't share, but shares SharedClassNested instance with Foo and Bar.
There was a problem hiding this comment.
Updated the test condition to cover both cases: where all properties (Foo, Bar, Baz) share the exact same instance, and where Foo and Bar share an instance while Baz is a distinct instance that shares the nested SharedClassNested instance.
Updated SharedReferenceInstancesRoundTrip to verify both complete instance sharing across Foo, Bar, and Baz, as well as complex graph sharing where Foo and Bar share an instance while Baz is a distinct item sharing a nested instance.
Removed simple duplicate instance test case and retained complex sharing case where Foo and Bar share a SharedClassItem instance while Baz has a distinct SharedClassItem instance sharing the same nested SharedClassNested instance.
Adds models and unit tests to verify that reference-type instances shared across multiple properties on a serializable object can be serialized and read via generated view structs.
PR created automatically by Jules for task 6741374473968267597 started by @sator-imaging