pub struct MockTransport { /* private fields */ }
Expand description
This extra struct is necessary in order to comply with mockall’s requirements regarding the parameter lifetimes see https://github.com/asomers/mockall/issues/571
Implementations§
Source§impl MockTransport
impl MockTransport
pub async fn do_send(&self, message: UMessage) -> Result<(), UStatus>
pub async fn do_register_listener<'a>( &'a self, source_filter: &'a UUri, sink_filter: Option<&'a UUri>, listener: Arc<dyn UListener>, ) -> Result<(), UStatus>
pub async fn do_unregister_listener<'a>( &'a self, source_filter: &'a UUri, sink_filter: Option<&'a UUri>, listener: Arc<dyn UListener>, ) -> Result<(), UStatus>
Sourcepub fn expect_do_send(&mut self) -> &mut Expectation
pub fn expect_do_send(&mut self) -> &mut Expectation
Create an Expectation
for mocking the do_send
method
Sourcepub fn expect_do_register_listener(&mut self) -> &mut Expectation
pub fn expect_do_register_listener(&mut self) -> &mut Expectation
Create an Expectation
for mocking the do_register_listener
method
Sourcepub fn expect_do_unregister_listener(&mut self) -> &mut Expectation
pub fn expect_do_unregister_listener(&mut self) -> &mut Expectation
Create an Expectation
for mocking the do_unregister_listener
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
Trait Implementations§
Source§impl Default for MockTransport
impl Default for MockTransport
Source§impl UTransport for MockTransport
This delegates the invocation of the UTransport functions to the mocked functions of the Transport struct.
see https://github.com/asomers/mockall/issues/571
impl UTransport for MockTransport
This delegates the invocation of the UTransport functions to the mocked functions of the Transport struct. see https://github.com/asomers/mockall/issues/571