pub struct ContractTester<'a> { /* private fields */ }Expand description
Contract tester for API routes
Implementations§
Source§impl<'a> ContractTester<'a>
impl<'a> ContractTester<'a>
Sourcepub fn with_config(router: &'a Router, config: ContractTestConfig) -> Self
pub fn with_config(router: &'a Router, config: ContractTestConfig) -> Self
Create with custom configuration
Sourcepub fn test_all_routes(&self) -> ContractTestResults
pub fn test_all_routes(&self) -> ContractTestResults
Test all routes
Sourcepub fn test_route(&self, route: &RouteMetadata) -> ContractTestResult
pub fn test_route(&self, route: &RouteMetadata) -> ContractTestResult
Test a specific route
Sourcepub fn generate_test_code(&self, route: &RouteMetadata) -> String
pub fn generate_test_code(&self, route: &RouteMetadata) -> String
Generate contract test for a route
Sourcepub fn coverage_stats(&self) -> HashMap<String, f64>
pub fn coverage_stats(&self) -> HashMap<String, f64>
Get coverage statistics
Auto Trait Implementations§
impl<'a> Freeze for ContractTester<'a>
impl<'a> !RefUnwindSafe for ContractTester<'a>
impl<'a> Send for ContractTester<'a>
impl<'a> Sync for ContractTester<'a>
impl<'a> Unpin for ContractTester<'a>
impl<'a> !UnwindSafe for ContractTester<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more