use crate::{ test_connection::{ExampleClientHandle, ExampleServerHandle}, test_utils::target::TcpServerTarget, }; #[test] fn test_tcp_test_target_build() { let host = "127.0.0.1:8080"; // Test build target by string let Ok(target) = TcpServerTarget::::from_address_str(host) else { panic!("Test target built failed from a target addr `{}`", host); }; assert_eq!(target.to_string(), "127.0.0.1:8080"); } #[tokio::test] async fn test_tcp_test_target_build_domain() { let host = "localhost"; // Test build target by DomainName and Connection let Ok(target) = TcpServerTarget::::from_domain(host).await else { panic!("Test target built failed from a domain named `{}`", host); }; // Test into string assert_eq!(target.to_string(), "127.0.0.1:8080"); }