diff --git a/src/cfdp/tlv/mod.rs b/src/cfdp/tlv/mod.rs index 7125998..1b90876 100644 --- a/src/cfdp/tlv/mod.rs +++ b/src/cfdp/tlv/mod.rs @@ -1141,6 +1141,22 @@ mod tests { assert!(fs_msg_empty.is_empty()); } + #[test] + fn test_fs_response_deserialization() { + let lv_0 = Lv::new_from_str(TLV_TEST_STR_0).unwrap(); + let response = FilestoreResponseTlv::new_no_filestore_message( + FilestoreActionCode::CreateFile, + 0b0001, + lv_0, + None, + ) + .expect("creating response failed"); + let mut buf: [u8; 32] = [0; 32]; + response.write_to_bytes(&mut buf).unwrap(); + let response_read_back = FilestoreResponseTlv::from_bytes(&buf).unwrap(); + assert_eq!(response_read_back, response); + } + #[test] fn test_entity_it_tlv_to_tlv() { let entity_id = UbfU16::new(0x0102);