From 9b6522b8b2705dd23eb0e021b139ff04d7841bf6 Mon Sep 17 00:00:00 2001 From: Ritesh Chitlangi Date: Sat, 4 Dec 2021 02:38:09 +0800 Subject: [PATCH] fix doctest in consolidate.rs --- epp-client/src/extensions/consolidate.rs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/epp-client/src/extensions/consolidate.rs b/epp-client/src/extensions/consolidate.rs index 629a2fc..aba6e3a 100644 --- a/epp-client/src/extensions/consolidate.rs +++ b/epp-client/src/extensions/consolidate.rs @@ -66,10 +66,11 @@ impl fmt::Display for GMonthDay { /// use epp_client::common::{DomainStatus, DomainContact}; /// use epp_client::extensions::consolidate::Sync; /// use epp_client::domain::update::DomainUpdate; -/// use epp_client::generate_client_tr_id; /// use epp_client::extensions::consolidate; /// use epp_client::extensions::consolidate::GMonthDay; /// use epp_client::common::NoExtension; +/// use epp_client::login::Login; +/// use epp_client::logout::Logout; /// use chrono::{DateTime, NaiveDate}; /// use std::str::FromStr; /// @@ -82,9 +83,6 @@ impl fmt::Display for GMonthDay { /// RegistryConfig { /// host: "example.com".to_owned(), /// port: 700, -/// username: "username".to_owned(), -/// password: "password".to_owned(), -/// ext_uris: None, /// tls_files: None, /// }, /// ); @@ -96,6 +94,9 @@ impl fmt::Display for GMonthDay { /// Err(e) => panic!("Failed to create EppClient: {}", e) /// }; /// +/// let login = Login::::new("username", "password", None); +/// client.transact(login, "transaction-id").await.unwrap(); +/// /// let exp = GMonthDay::new(5, 31, None).unwrap(); /// let consolidate_ext = consolidate::Sync::new(exp); /// @@ -103,11 +104,12 @@ impl fmt::Display for GMonthDay { /// let mut domain_update = DomainUpdate::::new("eppdev-100.com").with_extension(consolidate_ext); /// /// // send it to the registry and receive a response of type EppDomainUpdateResponse -/// let response = client.transact(domain_update, generate_client_tr_id(&client).as_str()).await.unwrap(); +/// let response = client.transact(domain_update, "transaction-id").await.unwrap(); /// /// println!("{:?}", response); /// -/// client.logout().await.unwrap(); +/// let logout = Logout::::new(); +/// client.transact(logout, "transaction-id").await.unwrap(); /// } /// ``` impl Sync {