raps-cli 4.15.0

RAPS (rapeseed) - Rust Autodesk Platform Services CLI
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
#![allow(deprecated)]

use assert_cmd::Command;

#[test]
fn test_exit_code_invalid_args() {
    let mut cmd = Command::cargo_bin("raps").unwrap();
    cmd.arg("--invalid-flag").assert().failure().code(2);
}

#[test]
fn test_exit_code_success() {
    let mut cmd = Command::cargo_bin("raps").unwrap();
    cmd.arg("--version").assert().success().code(0);
}

// We can't easily test 3, 4, 5 without full mocking or live API which assert_cmd doesn't do easily.
// But we can verify the mechanism is in place if T004 is implemented.