pub struct MockThingsApi { /* private fields */ }things_api only.Implementations§
Source§impl MockThingsApi
impl MockThingsApi
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 MockThingsApi
impl MockThingsApi
Sourcepub fn expect_create_thing_in_registry(&mut self) -> &mut Expectation
pub fn expect_create_thing_in_registry(&mut self) -> &mut Expectation
Create an Expectation for mocking the create_thing_in_registry method
Sourcepub fn expect_enable_thing(&mut self) -> &mut Expectation
pub fn expect_enable_thing(&mut self) -> &mut Expectation
Create an Expectation for mocking the enable_thing method
Sourcepub fn expect_get_available_firmwares_for_thing(&mut self) -> &mut Expectation
pub fn expect_get_available_firmwares_for_thing(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_available_firmwares_for_thing method
Sourcepub fn expect_get_thing_by_id(&mut self) -> &mut Expectation
pub fn expect_get_thing_by_id(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_thing_by_id method
Sourcepub fn expect_get_thing_config_status(&mut self) -> &mut Expectation
pub fn expect_get_thing_config_status(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_thing_config_status method
Sourcepub fn expect_get_thing_firmware_status(&mut self) -> &mut Expectation
pub fn expect_get_thing_firmware_status(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_thing_firmware_status method
Sourcepub fn expect_get_thing_status(&mut self) -> &mut Expectation
pub fn expect_get_thing_status(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_thing_status method
Sourcepub fn expect_get_things(&mut self) -> &mut Expectation
pub fn expect_get_things(&mut self) -> &mut Expectation
Create an Expectation for mocking the get_things method
Sourcepub fn expect_remove_thing_by_id(&mut self) -> &mut Expectation
pub fn expect_remove_thing_by_id(&mut self) -> &mut Expectation
Create an Expectation for mocking the remove_thing_by_id method
Sourcepub fn expect_update_thing(&mut self) -> &mut Expectation
pub fn expect_update_thing(&mut self) -> &mut Expectation
Create an Expectation for mocking the update_thing method
Sourcepub fn expect_update_thing_config(&mut self) -> &mut Expectation
pub fn expect_update_thing_config(&mut self) -> &mut Expectation
Create an Expectation for mocking the update_thing_config method
Sourcepub fn expect_update_thing_firmware(&mut self) -> &mut Expectation
pub fn expect_update_thing_firmware(&mut self) -> &mut Expectation
Create an Expectation for mocking the update_thing_firmware method
Trait Implementations§
Source§impl Debug for MockThingsApi
impl Debug for MockThingsApi
Source§impl Default for MockThingsApi
impl Default for MockThingsApi
Source§impl ThingsApi for MockThingsApi
impl ThingsApi for MockThingsApi
Source§fn create_thing_in_registry<'thing_dto, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_dto: ThingDto,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<CreateThingInRegistryError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_dto: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn create_thing_in_registry<'thing_dto, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_dto: ThingDto,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<CreateThingInRegistryError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_dto: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
POST /things
Source§fn enable_thing<'thing_uid, 'accept_language, 'body, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
body: Option<&'body str>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<EnableThingError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'body: 'async_trait,
'life0: 'async_trait,
fn enable_thing<'thing_uid, 'accept_language, 'body, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
body: Option<&'body str>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<EnableThingError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'body: 'async_trait,
'life0: 'async_trait,
PUT /things/{thingUID}/enable
Source§fn get_available_firmwares_for_thing<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<FirmwareDto>, Error<GetAvailableFirmwaresForThingError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn get_available_firmwares_for_thing<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<FirmwareDto>, Error<GetAvailableFirmwaresForThingError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
GET /things/{thingUID}/firmwares
Source§fn get_thing_by_id<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<GetThingByIdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn get_thing_by_id<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<GetThingByIdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
GET /things/{thingUID}
Source§fn get_thing_config_status<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConfigStatusMessage>, Error<GetThingConfigStatusError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn get_thing_config_status<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<Vec<ConfigStatusMessage>, Error<GetThingConfigStatusError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
GET /things/{thingUID}/config/status
Source§fn get_thing_firmware_status<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<FirmwareStatusDto, Error<GetThingFirmwareStatusError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn get_thing_firmware_status<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<FirmwareStatusDto, Error<GetThingFirmwareStatusError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
GET /things/{thingUID}/firmware/status
Source§fn get_thing_status<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<ThingStatusInfo, Error<GetThingStatusError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn get_thing_status<'thing_uid, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<ThingStatusInfo, Error<GetThingStatusError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
GET /things/{thingUID}/status
Source§fn get_things<'accept_language, 'summary, 'static_data_only, 'life0, 'async_trait>(
&'life0 self,
accept_language: Option<&'accept_language str>,
summary: Option<bool>,
static_data_only: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<Vec<EnrichedThingDto>, Error<GetThingsError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'accept_language: 'async_trait,
'summary: 'async_trait,
'static_data_only: 'async_trait,
'life0: 'async_trait,
fn get_things<'accept_language, 'summary, 'static_data_only, 'life0, 'async_trait>(
&'life0 self,
accept_language: Option<&'accept_language str>,
summary: Option<bool>,
static_data_only: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<Vec<EnrichedThingDto>, Error<GetThingsError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'accept_language: 'async_trait,
'summary: 'async_trait,
'static_data_only: 'async_trait,
'life0: 'async_trait,
GET /things
Source§fn remove_thing_by_id<'thing_uid, 'accept_language, 'force, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
force: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Error<RemoveThingByIdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'force: 'async_trait,
'life0: 'async_trait,
fn remove_thing_by_id<'thing_uid, 'accept_language, 'force, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
force: Option<bool>,
) -> Pin<Box<dyn Future<Output = Result<(), Error<RemoveThingByIdError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'force: 'async_trait,
'life0: 'async_trait,
DELETE /things/{thingUID}
Source§fn update_thing<'thing_uid, 'thing_dto, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
thing_dto: ThingDto,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<UpdateThingError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'thing_dto: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn update_thing<'thing_uid, 'thing_dto, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
thing_dto: ThingDto,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<UpdateThingError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'thing_dto: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
PUT /things/{thingUID}
Source§fn update_thing_config<'thing_uid, 'accept_language, 'request_body, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
request_body: Option<HashMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<UpdateThingConfigError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'request_body: 'async_trait,
'life0: 'async_trait,
fn update_thing_config<'thing_uid, 'accept_language, 'request_body, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
accept_language: Option<&'accept_language str>,
request_body: Option<HashMap<String, Value>>,
) -> Pin<Box<dyn Future<Output = Result<EnrichedThingDto, Error<UpdateThingConfigError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'accept_language: 'async_trait,
'request_body: 'async_trait,
'life0: 'async_trait,
PUT /things/{thingUID}/config
Source§fn update_thing_firmware<'thing_uid, 'firmware_version, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
firmware_version: &'firmware_version str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error<UpdateThingFirmwareError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'firmware_version: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
fn update_thing_firmware<'thing_uid, 'firmware_version, 'accept_language, 'life0, 'async_trait>(
&'life0 self,
thing_uid: &'thing_uid str,
firmware_version: &'firmware_version str,
accept_language: Option<&'accept_language str>,
) -> Pin<Box<dyn Future<Output = Result<(), Error<UpdateThingFirmwareError>>> + Send + 'async_trait>>where
Self: 'async_trait,
'thing_uid: 'async_trait,
'firmware_version: 'async_trait,
'accept_language: 'async_trait,
'life0: 'async_trait,
PUT /things/{thingUID}/firmware/{firmwareVersion}