use std::time::Duration;
use torin::geometry::Size2D;
pub struct TestingConfig {
vdom_timeout: Duration,
size: Size2D,
}
impl Default for TestingConfig {
fn default() -> Self {
Self {
vdom_timeout: Duration::from_millis(16),
size: Size2D::from((500.0, 500.0)),
}
}
}
impl TestingConfig {
pub fn new() -> Self {
TestingConfig::default()
}
pub fn with_size(mut self, size: Size2D) -> Self {
self.size = size;
self
}
pub fn with_vdom_timeout(mut self, vdom_timeout: Duration) -> Self {
self.vdom_timeout = vdom_timeout;
self
}
pub fn size(&self) -> Size2D {
self.size
}
pub fn vdom_timeout(&self) -> Duration {
self.vdom_timeout
}
}