()
| 261 | |
| 262 | #[test] |
| 263 | fn test_message_write_to_bufreader() { |
| 264 | let mut bytes = vec![]; |
| 265 | Message::Request(Request { id: 1.into(), method: "initialize".into(), params: json!(null) }) |
| 266 | .write(&mut bytes) |
| 267 | .unwrap(); |
| 268 | assert_eq!(from_utf8(&bytes).unwrap(), into_http_bytes(r#"{"jsonrpc":"2.0","id":1,"method":"initialize"}"#)); |
| 269 | } |
| 270 | } |