hegeltest 0.14.21

Property-based testing for Rust, built on Hypothesis
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
mod common;

use hegel::backend::DataSourceError;

#[test]
fn test_data_source_error_display() {
    let stop = DataSourceError::StopTest;
    let assume = DataSourceError::Assume;
    let server = DataSourceError::ServerError("something went wrong".to_string());
    let invalid = DataSourceError::InvalidArgument("bad schema".to_string());

    assert!(stop.to_string().contains("StopTest"));
    assert!(assume.to_string().contains("Assume"));
    assert_eq!(server.to_string(), "something went wrong");
    assert_eq!(invalid.to_string(), "bad schema");
}