Skip to content

[Test🧪] Add unit tests for QueryAssignmentResponseBody #6192

@mxsm

Description

@mxsm

Prerequisites

  • I have searched existing test issues

Test Scope

Module: rocketmq-remoting
File: src/protocol/body/query_assignment_response_body.rs
Current Coverage: Unknown
Target Coverage: 80%+

Test Cases

The following test scenarios need to be implemented for QueryAssignmentResponseBody:

  • Test default initialization creates empty HashSet
  • Test Clone trait implementation preserves all fields
  • Test serialization to JSON with camelCase field names
  • Test deserialization from JSON with camelCase field names
  • Test serialization/deserialization roundtrip
  • Test with empty message_queue_assignments HashSet
  • Test with single MessageQueueAssignment in HashSet
  • Test with multiple MessageQueueAssignments in HashSet
  • Test HashSet behavior (no duplicates)
  • Test adding MessageQueueAssignment to existing struct
  • Test MessageQueueAssignment equality in HashSet
  • Test Debug trait output
  • Test with various MessageQueueAssignment configurations

Willing to contribute?

  • I can submit a PR for this

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions