use dry4rust::cli::cli_error::CliError;
use dry4rust::cli::command_outcome::CommandOutcome;
#[test]
fn new_pairs_the_text_with_the_result_it_was_given() {
let outcome = CommandOutcome::new(String::from("body"), Err(CliError::CheckFailed));
assert_eq!(outcome.text, "body");
assert!(matches!(outcome.result, Err(CliError::CheckFailed)));
}
#[test]
fn succeeded_carries_the_text_with_an_ok_result() {
let outcome = CommandOutcome::succeeded(String::from("done"));
assert_eq!(outcome.text, "done");
assert!(outcome.result.is_ok());
}