use serde_json::json;
use super::{BALLS, BOARD, MARKS, WORKSPACE_BALLS, balls, board, marks, workspace_balls};
#[test]
fn the_four_doors_build_the_envelopes_the_wire_takes() {
assert_eq!(balls(), json!({ "op": "balls" }));
assert_eq!(board(), json!({ "op": "board" }));
assert_eq!(
workspace_balls("ws".to_owned()),
json!({ "op": "workspace-balls", "workspace": "ws" })
);
assert_eq!(
marks("ws".to_owned()),
json!({ "op": "marks", "workspace": "ws" })
);
}
#[test]
fn two_of_the_four_address_a_workspace_and_two_address_every_channel() {
assert!(!BALLS.addresses_a_workspace());
assert!(!BOARD.addresses_a_workspace());
assert!(WORKSPACE_BALLS.addresses_a_workspace());
assert!(MARKS.addresses_a_workspace());
}
#[test]
fn the_usage_lines_come_off_the_rows() {
assert_eq!(BALLS.usage(), "lernie balls");
assert_eq!(BOARD.usage(), "lernie board");
assert_eq!(
WORKSPACE_BALLS.usage(),
"lernie workspace-balls <workspace>"
);
assert_eq!(MARKS.usage(), "lernie marks <workspace>");
}