fn verify_add_attribute_result(
        params: ProvenanceMsgParams,
        expected_registrar: &str,
        expected_result_name: &str,
    ) {
        match params {
            ProvenanceMsgParams::Attribute(AttributeMsgParams::AddAttribute {
                name,
                value,
                value_type,
                ..
            }) => {
                assert_eq!(name, expected_registrar);
                assert_eq!(
                    from_binary::<String>(&value)
                        .expect("unable to deserialize name response binary"),
                    expected_result_name.to_string(),
                );
                assert_eq!(value_type, AttributeValueType::String)
            }
            _ => panic!("unexpected provenance message type"),
        }
    }
/// Helper to verify that a name was properly registered under the appropriate registrar.
Helper to verify that a name was properly registered under the appropriate registrar.
Helper to verify that a name was properly registered under the appropriate registrar .
fn verify_add_attribute_result(
        params: ProvenanceMsgParams,
        expected_registrar: &str,
        expected_result_name: &str,
    ) {
        match params {
            ProvenanceMsgParams::Attribute(AttributeMsgParams::AddAttribute {
                name,
                value,
                value_type,
                ..
            }) => {
                assert_eq!(name, expected_registrar);
                assert_eq!(
                    from_binary::<String>(&value)
                        .expect("unable to deserialize name response binary"),
                    expected_result_name.to_string(),
                );
                assert_eq!(value_type, AttributeValueType::String)
            }
            _ => panic!("unexpected provenance message type"),
        }
    }
fn verify_add_attribute_result ( params : ProvenanceMsgParams , expected_registrar : & str , expected_result_name : & str , ) { match params { ProvenanceMsgParams :: Attribute ( AttributeMsgParams :: AddAttribute { name , value , value_type , .. } ) => { assert_eq ! ( name expected_registrar ) ; assert_eq ! ( from_binary String ( value ) expect ( " " ) expected_result_name to_string ( ) ) ; assert_eq ! ( value_type AttributeValueType String ) } _ => panic ! ( " " ) , } }
Helper to verify that a name was properly registered under the appropriate registrar.
Helper to verify that a name was properly registered under the appropriate registrar .
params
ProvenanceMsgParams
expected_registrar
&str
expected_result_name
&str