pub async fn expect_no_requests(&mut self)
    where
        Request: Debug,
    {
        if let Some(response_sender) = self.try_next_request().await {
            panic!(
                "Received an unexpected request: {:?}",
                response_sender.request
            );
        }
    }
/// Expect no requests to be received.
///
/// The internal queue of received requests should be empty, and no new requests should arrive
/// for the max delay time configured by [`MockServiceBuilder::with_max_request_delay`].
///
/// # Panics
///
/// If the queue is not empty or if a request is received before the max request delay timeout
/// expires.
///
/// # Example
///
/// ```
/// # use zebra_test::mock_service::MockService;
/// # use tower::ServiceExt;
/// #
/// # let reactor = tokio::runtime::Builder::new_current_thread()
/// #     .enable_all()
/// #     .build()
/// #     .expect("Failed to build Tokio runtime");
/// #
/// # reactor.block_on(async {
/// #     let mut mock_service: MockService<(), (), _> = MockService::build().for_unit_tests();
/// #
/// mock_service.expect_no_requests().await;
/// # });
/// ```
Expect no requests to be received.
The internal queue of received requests should be empty, and no new requests should arrive
for the max delay time configured by [`MockServiceBuilder::with_max_request_delay`].
Expect no requests to be received . The internal queue of received requests should be empty and no new requests should arrive for the max delay time configured by [ ` MockServiceBuilder :: with_max_request_delay ` ] .
pub async fn expect_no_requests(&mut self)
    where
        Request: Debug,
    {
        if let Some(response_sender) = self.try_next_request().await {
            panic!(
                "Received an unexpected request: {:?}",
                response_sender.request
            );
        }
    }
pub async fn expect_no_requests ( & mut self ) where Request : Debug , { if let Some ( response_sender ) = self . try_next_request ( ) . await { panic ! ( " " response_sender request ) ; } }
Expect no requests to be received.
Expect no requests to be received .
&mut self
panics
If the queue is not empty or if a request is received before the max request delay timeout
expires.
If the queue is not empty or if a request is received before the max request delay timeout expires .
example
None
use zebra_test::mock_service::mockservice;
None
use tower::serviceext;
None
let reactor = tokio::runtime::builder::new_current_thread()
None
.enable_all()
None
.build()
None
.expect("failed to build tokio runtime");
None
reactor.block_on(async {
None
let mut mock_service: mockservice<(), (), _> = mockservice::build().for_unit_tests();
None
});
None