Expand description
Public test utilities for use in downstream crates. Test utilities for turbomcp-protocol
This module provides shared test helpers used throughout the crate’s tests. Following the pattern from axum and tokio, these utilities are public to allow downstream crates to use them in their tests.
§Organization
All test fixtures and helpers are in this single module for simplicity. As the test suite grows, this can be split into submodules if needed.
§Usage
#[cfg(test)]
mod tests {
use super::*;
use crate::test_helpers::*;
#[test]
fn my_test() {
let request = test_request();
assert_valid(&result);
}
}Functions§
- assert_
invalid - Assert that validation failed
- assert_
valid - Assert that validation passed without warnings
- test_
initialize_ request - Create a valid initialize request for testing
- test_
prompt - Create a valid prompt for testing
- test_
prompt_ argument - Create a prompt argument for testing
- test_
request - Create a standard test JSON-RPC request
- test_
resource - Create a valid resource for testing
- test_
tool - Create a valid tool for testing