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

Source from the content-addressed store, hash-verified

1241
1242 #[test]
1243 fn test_file_status_entry_setters() {
1244 let mut entry = FileStatusEntry::new(PathBuf::from("test.txt"), FileStatus::Modified);
1245
1246 let hash = Hash::of(b"content");
1247 let inode = Inode::new(100);
1248
1249 entry.set_inode(inode);
1250 entry.set_recorded_hash(hash);
1251 entry.set_current_hash(hash);
1252 entry.set_details("Some details".to_string());
1253
1254 assert_eq!(entry.inode(), Some(inode));
1255 assert_eq!(entry.recorded_hash(), Some(&hash));
1256 assert_eq!(entry.current_hash(), Some(&hash));
1257 assert_eq!(entry.details(), Some("Some details"));
1258 }
1259
1260 // RepositoryStatus Tests
1261

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