mod testprotocol;
mod testsupport;

use crate::testprotocol::acme::user::v1::AccessToken;
use saas_rs_sdk::models::assign_message;

#[test]
fn can_unset_an_optional_field() {
    let mut target = AccessToken {
        id: "123".to_string(),
        description: Some("abc".to_string()),
        ..Default::default()
    };
    let source = AccessToken {
        id: "123".to_string(),
        description: None,
        ..Default::default()
    };
    assign_message(&mut target, &source).unwrap();
    assert_eq!(target.id, "123".to_string());
    assert_eq!(target.description, None);
}
