pub struct MockChainSyncInterface<B: BlockT> { /* private fields */ }
Implementations§
Source§impl<B: BlockT> MockChainSyncInterface<B>
impl<B: BlockT> MockChainSyncInterface<B>
pub fn justification_sync_link_request_justification( &self, hash: &B::Hash, number: NumberFor<B>, )
pub fn justification_sync_link_clear_justification_requests(&self)
Sourcepub fn expect_justification_sync_link_request_justification(
&mut self,
) -> &mut Expectation<B>
pub fn expect_justification_sync_link_request_justification( &mut self, ) -> &mut Expectation<B>
Create an Expectation
for mocking the justification_sync_link_request_justification
method
Sourcepub fn expect_justification_sync_link_clear_justification_requests(
&mut self,
) -> &mut Expectation<B>
pub fn expect_justification_sync_link_clear_justification_requests( &mut self, ) -> &mut Expectation<B>
Create an Expectation
for mocking the justification_sync_link_clear_justification_requests
method
Sourcepub fn checkpoint(&mut self)
pub fn checkpoint(&mut self)
Validate that all current expectations for all methods have been satisfied, and discard them.
Sourcepub fn new() -> Self
pub fn new() -> Self
Create a new mock object with no expectations.
This method will not be generated if the real struct
already has a new
method. However, it will be
generated if the struct implements a trait with a new
method. The trait’s new
method can still be called
like <MockX as TraitY>::new
Source§impl<B: BlockT + 'static> MockChainSyncInterface<B>
impl<B: BlockT + 'static> MockChainSyncInterface<B>
Sourcepub fn expect_set_sync_fork_request(&mut self) -> &mut Expectation<B>
pub fn expect_set_sync_fork_request(&mut self) -> &mut Expectation<B>
Create an Expectation
for mocking the set_sync_fork_request
method
Source§impl<B: BlockT> MockChainSyncInterface<B>
impl<B: BlockT> MockChainSyncInterface<B>
Sourcepub fn expect_blocks_processed(&mut self) -> &mut Expectation<B>
pub fn expect_blocks_processed(&mut self) -> &mut Expectation<B>
Create an Expectation
for mocking the blocks_processed
method
Sourcepub fn expect_justification_imported(&mut self) -> &mut Expectation<B>
pub fn expect_justification_imported(&mut self) -> &mut Expectation<B>
Create an Expectation
for mocking the justification_imported
method
Sourcepub fn expect_request_justification(&mut self) -> &mut Expectation<B>
pub fn expect_request_justification(&mut self) -> &mut Expectation<B>
Create an Expectation
for mocking the request_justification
method
Trait Implementations§
Source§impl<B: BlockT> Default for MockChainSyncInterface<B>
impl<B: BlockT> Default for MockChainSyncInterface<B>
Source§impl<B: BlockT> JustificationSyncLink<B> for MockChainSyncInterface<B>
impl<B: BlockT> JustificationSyncLink<B> for MockChainSyncInterface<B>
Source§fn request_justification(&self, hash: &B::Hash, number: NumberFor<B>)
fn request_justification(&self, hash: &B::Hash, number: NumberFor<B>)
Source§fn clear_justification_requests(&self)
fn clear_justification_requests(&self)
Source§impl<B: BlockT> Link<B> for MockChainSyncInterface<B>
impl<B: BlockT> Link<B> for MockChainSyncInterface<B>
Source§fn blocks_processed(
&self,
imported: usize,
count: usize,
results: Vec<(Result<BlockImportStatus<NumberFor<B>>, BlockImportError>, B::Hash)>,
)
fn blocks_processed( &self, imported: usize, count: usize, results: Vec<(Result<BlockImportStatus<NumberFor<B>>, BlockImportError>, B::Hash)>, )
Source§fn justification_imported(
&self,
who: PeerId,
hash: &B::Hash,
number: NumberFor<B>,
success: bool,
)
fn justification_imported( &self, who: PeerId, hash: &B::Hash, number: NumberFor<B>, success: bool, )
Source§fn request_justification(&self, hash: &B::Hash, number: NumberFor<B>)
fn request_justification(&self, hash: &B::Hash, number: NumberFor<B>)
Auto Trait Implementations§
impl<B> Freeze for MockChainSyncInterface<B>
impl<B> RefUnwindSafe for MockChainSyncInterface<B>where
B: RefUnwindSafe,
impl<B> Send for MockChainSyncInterface<B>
impl<B> Sync for MockChainSyncInterface<B>
impl<B> Unpin for MockChainSyncInterface<B>where
B: Unpin,
impl<B> UnwindSafe for MockChainSyncInterface<B>where
B: UnwindSafe,
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
Source§impl<T> CheckedConversion for T
impl<T> CheckedConversion for T
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>
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>
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 moreSource§impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
impl<Src, Dest> IntoTuple<Dest> for Srcwhere
Dest: FromTuple<Src>,
fn into_tuple(self) -> Dest
Source§impl<T, Outer> IsWrappedBy<Outer> for T
impl<T, Outer> IsWrappedBy<Outer> for T
Source§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<T> SaturatedConversion for T
impl<T> SaturatedConversion for T
Source§fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
fn saturated_from<T>(t: T) -> Selfwhere
Self: UniqueSaturatedFrom<T>,
Source§fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
fn saturated_into<T>(self) -> Twhere
Self: UniqueSaturatedInto<T>,
T
. Read moreSource§impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
impl<S, T> UncheckedInto<T> for Swhere
T: UncheckedFrom<S>,
Source§fn unchecked_into(self) -> T
fn unchecked_into(self) -> T
unchecked_from
.Source§impl<T, S> UniqueSaturatedInto<T> for S
impl<T, S> UniqueSaturatedInto<T> for S
Source§fn unique_saturated_into(self) -> T
fn unique_saturated_into(self) -> T
T
.