pub struct TestConfiguration {
pub test_mode: bool,
pub no_changes_commands: Vec<String>,
pub skip_commit_validation: bool,
pub track_focus: bool,
pub worktree_name: Option<String>,
pub additional_args: HashMap<String, String>,
}Expand description
Test configuration for dependency injection
This replaces environment variable usage in tests, providing:
- Thread-safe configuration
- Test isolation
- Type safety
- No global state
Fields§
§test_mode: boolEnables test mode behavior
no_changes_commands: Vec<String>Commands that should simulate no changes during tests
skip_commit_validation: boolSkip commit validation in tests
track_focus: boolEnable focus tracking for tests
worktree_name: Option<String>Worktree name for worktree tests
additional_args: HashMap<String, String>Additional arguments for flexible configuration
Implementations§
Source§impl TestConfiguration
impl TestConfiguration
Sourcepub fn builder() -> TestConfigurationBuilder
pub fn builder() -> TestConfigurationBuilder
Create a builder for constructing test configuration
Sourcepub fn is_test_mode(&self) -> bool
pub fn is_test_mode(&self) -> bool
Check if test mode is enabled
Sourcepub fn should_simulate_no_changes(&self, command: &str) -> bool
pub fn should_simulate_no_changes(&self, command: &str) -> bool
Check if a command should simulate no changes
Trait Implementations§
Source§impl Clone for TestConfiguration
impl Clone for TestConfiguration
Source§fn clone(&self) -> TestConfiguration
fn clone(&self) -> TestConfiguration
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for TestConfiguration
impl Debug for TestConfiguration
Source§impl Default for TestConfiguration
impl Default for TestConfiguration
Source§fn default() -> TestConfiguration
fn default() -> TestConfiguration
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TestConfiguration
impl RefUnwindSafe for TestConfiguration
impl Send for TestConfiguration
impl Sync for TestConfiguration
impl Unpin for TestConfiguration
impl UnsafeUnpin for TestConfiguration
impl UnwindSafe for TestConfiguration
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<A, B, T> HttpServerConnExec<A, B> for Twhere
B: Body,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more