pub struct TestWorldBuilder { /* private fields */ }Expand description
Builder for constructing TestWorld with fine-grained control.
This builder allows testing edge cases like:
- Fresh install (no .agtrace directory)
- Missing or invalid configuration
- Custom environment variables
§Example
use agtrace_testing::TestWorld;
let world = TestWorld::builder()
.without_data_dir()
.build();
assert!(!world.assert_database_exists());Implementations§
Source§impl TestWorldBuilder
impl TestWorldBuilder
pub fn new() -> Self
Sourcepub fn without_data_dir(self) -> Self
pub fn without_data_dir(self) -> Self
Skip automatic creation of .agtrace directory.
Useful for testing fresh install scenarios where the data directory does not exist yet.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TestWorldBuilder
impl RefUnwindSafe for TestWorldBuilder
impl Send for TestWorldBuilder
impl Sync for TestWorldBuilder
impl Unpin for TestWorldBuilder
impl UnwindSafe for TestWorldBuilder
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