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:955–970  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

953
954 #[test]
955 fn test_file_status_entry_setters() {
956 let mut entry = FileStatusEntry::new(PathBuf::from("test.txt"), FileStatus::Modified);
957
958 let hash = Hash::of(b"content");
959 let inode = Inode::new(100);
960
961 entry.set_inode(inode);
962 entry.set_recorded_hash(hash);
963 entry.set_current_hash(hash);
964 entry.set_details("Some details".to_string());
965
966 assert_eq!(entry.inode(), Some(inode));
967 assert_eq!(entry.recorded_hash(), Some(&hash));
968 assert_eq!(entry.current_hash(), Some(&hash));
969 assert_eq!(entry.details(), Some("Some details"));
970 }
971
972 // RepositoryStatus Tests
973

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