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

Function test_options_builder_chain

atomic-repository/src/record/tests.rs:128–144  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

126
127#[test]
128fn test_options_builder_chain() {
129 let opts = RecordOptions::new()
130 .paths(vec!["src/"])
131 .with_all(false)
132 .with_algorithm(Algorithm::Patience)
133 .with_max_file_size(1024 * 1024)
134 .with_skip_binary(true)
135 .message("Test change")
136 .view("feature");
137
138 assert_eq!(opts.get_paths().len(), 1);
139 assert!(!opts.all());
140 assert_eq!(opts.algorithm(), Algorithm::Patience);
141 assert!(opts.skip_binary());
142 assert_eq!(opts.get_message(), Some("Test change"));
143 assert_eq!(opts.get_view(), Some("feature"));
144}
145
146#[test]
147fn test_options_should_include_all() {

Callers

nothing calls this directly

Calls 7

viewMethod · 0.45
messageMethod · 0.45
with_skip_binaryMethod · 0.45
with_max_file_sizeMethod · 0.45
with_algorithmMethod · 0.45
with_allMethod · 0.45
pathsMethod · 0.45

Tested by

no test coverage detected