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

Function test_options_builder_chain

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

Source from the content-addressed store, hash-verified

119
120#[test]
121fn test_options_builder_chain() {
122 let opts = RecordOptions::new()
123 .paths(vec!["src/"])
124 .with_all(false)
125 .with_algorithm(Algorithm::Patience)
126 .with_max_file_size(1024 * 1024)
127 .with_skip_binary(true)
128 .message("Test change")
129 .view("feature");
130
131 assert_eq!(opts.get_paths().len(), 1);
132 assert!(!opts.all());
133 assert_eq!(opts.algorithm(), Algorithm::Patience);
134 assert!(opts.skip_binary());
135 assert_eq!(opts.get_message(), Some("Test change"));
136 assert_eq!(opts.get_view(), Some("feature"));
137}
138
139#[test]
140fn 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