Skip to content

[Test🧪] Add unit tests for QueryAssignmentRequestBody #6191

@mxsm

Description

@mxsm

Prerequisites

  • I have searched existing test issues

Test Scope

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

Test Cases

The following test scenarios need to be implemented for QueryAssignmentRequestBody:

  • Test default initialization creates empty struct
  • 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 topic field with various values
  • Test consumer_group field with various values
  • Test client_id field with various values
  • Test strategy_name field with various values
  • Test message_model field with different MessageModel values
  • Test MessageModel enum variants (e.g., Broadcasting, Clustering)
  • Test with empty string fields
  • Test with special characters in string fields
  • Test Debug trait output
  • Test creating struct with all fields populated

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