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

Function test_record_builder_chain

atomic-cli/src/commands/record/tests.rs:197–216  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

195
196 #[test]
197 fn test_record_builder_chain() {
198 let record = Record::new()
199 .with_message("Test")
200 .with_all(true)
201 .with_files(vec!["src/main.rs"])
202 .with_author("Bob")
203 .with_algorithm("patience")
204 .with_dry_run(true)
205 .with_skip_binary(true)
206 .with_max_size(1000);
207
208 assert_eq!(record.message, Some("Test".to_string()));
209 assert!(record.all);
210 assert_eq!(record.files.len(), 1);
211 assert_eq!(record.author, Some("Bob".to_string()));
212 assert_eq!(record.algorithm, "patience");
213 assert!(record.dry_run);
214 assert!(record.skip_binary);
215 assert_eq!(record.max_size, Some(1000));
216 }
217
218 // Algorithm Parsing Tests
219

Callers

nothing calls this directly

Calls 8

with_max_sizeMethod · 0.80
with_skip_binaryMethod · 0.45
with_dry_runMethod · 0.45
with_algorithmMethod · 0.45
with_authorMethod · 0.45
with_filesMethod · 0.45
with_allMethod · 0.45
with_messageMethod · 0.45

Tested by

no test coverage detected