MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / test_file_status_entry_setters

Function test_file_status_entry_setters

atomic-repository/src/status.rs:967–982  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

965
966 #[test]
967 fn test_file_status_entry_setters() {
968 let mut entry = FileStatusEntry::new(PathBuf::from("test.txt"), FileStatus::Modified);
969
970 let hash = Hash::of(b"content");
971 let inode = Inode::new(100);
972
973 entry.set_inode(inode);
974 entry.set_recorded_hash(hash);
975 entry.set_current_hash(hash);
976 entry.set_details("Some details".to_string());
977
978 assert_eq!(entry.inode(), Some(inode));
979 assert_eq!(entry.recorded_hash(), Some(&hash));
980 assert_eq!(entry.current_hash(), Some(&hash));
981 assert_eq!(entry.details(), Some("Some details"));
982 }
983
984 // RepositoryStatus Tests
985

Callers

nothing calls this directly

Calls 4

set_recorded_hashMethod · 0.80
set_current_hashMethod · 0.80
set_detailsMethod · 0.80
set_inodeMethod · 0.45

Tested by

no test coverage detected