pub struct MockScenarioBuilder { /* private fields */ }Expand description
Builder for creating mock GitHub scenarios
Implementations§
Source§impl MockScenarioBuilder
impl MockScenarioBuilder
pub fn new() -> Self
Sourcepub fn gh_available(self) -> Self
pub fn gh_available(self) -> Self
gh CLI is available and authenticated
Sourcepub fn gh_not_available(self) -> Self
pub fn gh_not_available(self) -> Self
gh CLI is not available
Sourcepub fn gh_not_authenticated(self) -> Self
pub fn gh_not_authenticated(self) -> Self
gh CLI is available but not authenticated
Sourcepub fn with_no_pr(self, branch: &str) -> Self
pub fn with_no_pr(self, branch: &str) -> Self
Configure no PR found for a branch
Sourcepub fn with_auth_error(self, branch: &str) -> Self
pub fn with_auth_error(self, branch: &str) -> Self
Configure PR view to fail with auth error
Sourcepub fn with_merge_commit(self, sha: &str, parent_count: usize) -> Self
pub fn with_merge_commit(self, sha: &str, parent_count: usize) -> Self
Configure git cat-file response for merge method detection
Sourcepub fn with_remote_delete_success(self, branch: &str) -> Self
pub fn with_remote_delete_success(self, branch: &str) -> Self
Configure successful remote branch deletion
Sourcepub fn with_remote_already_deleted(self, branch: &str) -> Self
pub fn with_remote_already_deleted(self, branch: &str) -> Self
Configure remote branch already deleted
Sourcepub fn with_remote_delete_failure(self, branch: &str, error: &str) -> Self
pub fn with_remote_delete_failure(self, branch: &str, error: &str) -> Self
Configure remote branch deletion failure
Sourcepub fn build(self) -> MockCommandExecutor
pub fn build(self) -> MockCommandExecutor
Build the mock executor
Trait Implementations§
Auto Trait Implementations§
impl Freeze for MockScenarioBuilder
impl RefUnwindSafe for MockScenarioBuilder
impl Send for MockScenarioBuilder
impl Sync for MockScenarioBuilder
impl Unpin for MockScenarioBuilder
impl UnwindSafe for MockScenarioBuilder
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