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

Function test_options_builder_chain

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

Source from the content-addressed store, hash-verified

134
135#[test]
136fn test_options_builder_chain() {
137 let opts = RecordOptions::new()
138 .paths(vec!["src/"])
139 .with_all(false)
140 .with_algorithm(Algorithm::Patience)
141 .with_max_file_size(1024 * 1024)
142 .with_skip_binary(true)
143 .message("Test change")
144 .view("feature");
145
146 assert_eq!(opts.get_paths().len(), 1);
147 assert!(!opts.all());
148 assert_eq!(opts.algorithm(), Algorithm::Patience);
149 assert!(opts.skip_binary());
150 assert_eq!(opts.get_message(), Some("Test change"));
151 assert_eq!(opts.get_view(), Some("feature"));
152}
153
154#[test]
155fn 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