decon-spf 0.3.3

This is a simple tool that allows you to deconstruct an existing SPF record that might be retreived in a normal DNS TXT lookup. With version 0.2.0 you can now also construct a new Spf record.
Documentation
use crate::spf::mechanism::Mechanism;

#[test]
fn default() {
    let input = "all";

    let m: Mechanism<String> = input.parse().unwrap();
    assert_eq!(m.kind().is_all(), true);
    assert_eq!(m.raw(), "all");
    assert_eq!(m.to_string(), input);
}
#[test]
fn with_plus() {
    let input = "+all";

    let m: Mechanism<String> = input.parse().unwrap();
    assert_eq!(m.kind().is_all(), true);
    assert_eq!(m.raw(), "all");
    assert_eq!(m.to_string(), "all");
}
#[test]
fn neutral() {
    let input = "~all";

    let m: Mechanism<String> = input.parse().unwrap();
    assert_eq!(m.kind().is_all(), true);
    assert_eq!(m.raw(), "all");
    assert_eq!(m.to_string(), input);
}
#[test]
fn fail() {
    let input = "-all";

    let m: Mechanism<String> = input.parse().unwrap();
    assert_eq!(m.kind().is_all(), true);
    assert_eq!(m.raw(), "all");
    assert_eq!(m.to_string(), input);
}