use crate::contracts::*;
use serde::Serialize;
#[derive(Debug, Clone, PartialEq, Serialize)]
pub enum SeverityLevel {
Verbose,
Information,
Warning,
Error,
Critical,
}
#[cfg(test)]
mod tests {
use serde_json::to_string;
use super::*;
#[test]
fn it_json_serializes_valid_constants() {
assert_eq!(to_string(&SeverityLevel::Verbose).unwrap(), r#""Verbose""#);
assert_eq!(to_string(&SeverityLevel::Information).unwrap(), r#""Information""#);
assert_eq!(to_string(&SeverityLevel::Warning).unwrap(), r#""Warning""#);
assert_eq!(to_string(&SeverityLevel::Error).unwrap(), r#""Error""#);
assert_eq!(to_string(&SeverityLevel::Critical).unwrap(), r#""Critical""#);
}
}