codama-nodes 0.10.0

Node specifications and helpers for the Codama standard
Documentation
use crate::PayerValueNode;

impl PayerValueNode {
    pub fn new() -> Self {
        Self::default()
    }
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn new() {
        let node = PayerValueNode::new();
        assert_eq!(node, PayerValueNode {});
    }

    #[test]
    fn to_json() {
        let node = PayerValueNode::new();
        let json = serde_json::to_string(&node).unwrap();
        assert_eq!(json, r#"{"kind":"payerValueNode"}"#);
    }

    #[test]
    fn from_json() {
        let json = r#"{"kind":"payerValueNode"}"#;
        let node: PayerValueNode = serde_json::from_str(json).unwrap();
        assert_eq!(node, PayerValueNode::new());
    }
}