use hyper_custom_cert::HttpClient;
use std::collections::HashMap;
use std::time::Duration;
#[test]
fn default_client_creation() {
let _client = HttpClient::new();
}
#[test]
fn default_client_from_builder() {
let _client = HttpClient::builder().build();
}
#[test]
fn builder_with_timeout() {
let _client = HttpClient::builder()
.with_timeout(Duration::from_secs(30))
.build();
}
#[test]
fn builder_with_headers() {
let mut headers = HashMap::new();
headers.insert("User-Agent".to_string(), "test-agent".to_string());
headers.insert("Accept".to_string(), "application/json".to_string());
let _client = HttpClient::builder().with_default_headers(headers).build();
}
#[test]
fn builder_combined_configuration() {
let mut headers = HashMap::new();
headers.insert("Custom-Header".to_string(), "custom-value".to_string());
let _client = HttpClient::builder()
.with_timeout(Duration::from_secs(45))
.with_default_headers(headers)
.build();
}
#[cfg(feature = "native-tls")]
#[test]
fn native_tls_specific_functionality() {
let _client = HttpClient::builder()
.with_timeout(Duration::from_secs(10))
.build();
}
#[test]
fn rustls_methods_not_available() {
let _builder = HttpClient::builder();
}
#[test]
fn insecure_methods_not_available() {
let _builder = HttpClient::builder();
}
#[test]
fn default_client_static_method() {
let _client = HttpClient::default();
}
#[tokio::test]
async fn post_smoke_default() {
let client = HttpClient::new();
let _ = client;
}