mirror of
https://github.com/Noratrieb/haesli.git
synced 2026-01-16 20:55:03 +01:00
more cleanup
This commit is contained in:
parent
439696cf3f
commit
14ad4e1011
11 changed files with 1199 additions and 1048 deletions
|
|
@ -1,13 +1,13 @@
|
|||
use crate::frame::FrameType;
|
||||
use crate::{frame, methods};
|
||||
use amqp_core::connection::ChannelNum;
|
||||
use amqp_core::methods::{FieldValue, Method};
|
||||
use amqp_core::methods::{ConnectionStart, ConnectionStartOk, FieldValue, Method};
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[tokio::test]
|
||||
async fn write_start_ok_frame() {
|
||||
let mut payload = Vec::new();
|
||||
let method = Method::ConnectionStart {
|
||||
let method = Method::ConnectionStart(ConnectionStart {
|
||||
version_major: 0,
|
||||
version_minor: 9,
|
||||
server_properties: HashMap::from([(
|
||||
|
|
@ -16,7 +16,7 @@ async fn write_start_ok_frame() {
|
|||
)]),
|
||||
mechanisms: "PLAIN".into(),
|
||||
locales: "en_US".into(),
|
||||
};
|
||||
});
|
||||
|
||||
methods::write::write_method(method, &mut payload).unwrap();
|
||||
|
||||
|
|
@ -141,7 +141,7 @@ fn read_start_ok_payload() {
|
|||
|
||||
assert_eq!(
|
||||
method,
|
||||
Method::ConnectionStartOk {
|
||||
Method::ConnectionStartOk(ConnectionStartOk {
|
||||
client_properties: HashMap::from([
|
||||
(
|
||||
"product".to_string(),
|
||||
|
|
@ -179,6 +179,6 @@ fn read_start_ok_payload() {
|
|||
mechanism: "PLAIN".to_string(),
|
||||
response: "\x00admin\x00".into(),
|
||||
locale: "en_US".to_string()
|
||||
}
|
||||
})
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue