TestServer_Register | Tests basic method registration and execution | Method handler executes successfully and returns correct result (3 for add(1,2)) |
TestServer_MethodNotFound | Tests calling an unregistered method | Returns JSON-RPC error with code -32601 (Method not found) |
TestServer_InvalidJSONRPCVersion | Tests request with wrong JSON-RPC version (1.0) | Returns JSON-RPC error with code -32600 (Invalid Request) |
TestServer_Notification | Tests notification handling (request without ID) | Handler executes but returns HTTP 204 No Content with no response body |
TestServer_BatchRequest | Tests batch request with multiple method calls | Processes all requests and returns array of responses with correct results |
TestServer_ErrorInHandler | Tests handler that returns custom error | Returns JSON-RPC error response with custom error message |
TestMiddleware (wrong method) | Tests middleware with non-POST HTTP method | Returns JSON-RPC error indicating method must be POST |
TestMiddleware (wrong content type) | Tests middleware with non-JSON content type | Returns JSON-RPC error indicating Content-Type must be application/json |
TestParseError | Tests invalid JSON in request body | Returns JSON-RPC error with code -32700 (Parse error) |
TestNewError | Tests custom error creation | Error object created with correct code and message |