use std::collections::BTreeMap;
use super::TestResponse;
pub trait GenericTestClient: Send + Sync {
type Error: std::error::Error + Send + Sync + 'static;
fn execute_request(
&self,
method: &str,
path: &str,
headers: &BTreeMap<String, String>,
body: Option<&[u8]>,
) -> Result<TestResponse, Self::Error>;
fn base_url(&self) -> String;
}
pub trait GenericTestServer: Send + Sync {
type Error: std::error::Error + Send + Sync + 'static;
fn url(&self) -> String;
fn port(&self) -> u16;
fn start(&mut self) -> Result<(), Self::Error>;
fn stop(&mut self) -> Result<(), Self::Error>;
}