use super::file::FileLocations; use super::*; // #[test] fn test_add_file() { let mut file_table = ProtoFileTable::new(); let file_to_add = File::new(FileLocations::Bin, "test".to_string(), "txt".to_string()); file_to_add.write_bytes(b"Hello, world!"); file_table.add_file("test", file_to_add); let file = file_table.get_file("test.txt"); assert_eq!( file.unwrap().data_pointer.as_slice(), "Hello, world!".as_bytes() ); }