use super::{ArrangeError, CycleError, DirectFanoutError, EdgeEndpointError};
use crate::arrange::{EdgeId, NodeId};
#[test]
fn a_refusal_renders_the_facts_it_carries() {
assert_eq!(
ArrangeError::EdgeEndpointOutOfRange(EdgeEndpointError::new(EdgeId::new(2), NodeId::new(5), 3))
.to_string(),
"edge#2 endpoint node#5 is out of range; the graph declares 3 node(s)"
);
assert_eq!(
ArrangeError::DirectFanout(DirectFanoutError::new(NodeId::new(1), "split".into(), 2))
.to_string(),
"node#1 (`split`) has 2 out-edges including a Direct edge; Direct must be exclusive"
);
assert_eq!(
ArrangeError::Cycle(CycleError::new(NodeId::new(4), "loop".into())).to_string(),
"graph cycle through node#4 (`loop`)"
);
}