Struct exonum_testkit::TestKitApi
[−]
[src]
pub struct TestKitApi { /* fields omitted */ }
API encapsulation for the testkit. Allows to execute and synchronously retrieve results for REST-ful endpoints of services.
Methods
impl TestKitApi
[src]
fn public_mount(&self) -> &Mount
[src]
Returns the mounting point for public APIs. Useful for intricate testing not covered
by get*
and post*
functions.
fn private_mount(&self) -> &Mount
[src]
Returns the mounting point for private APIs. Useful for intricate testing not covered
by get*
and post*
functions.
fn send<T: Transaction>(&self, transaction: T)
[src]
Sends a transaction to the node via ApiSender
.
fn get<D>(&self, kind: ApiKind, endpoint: &str) -> D where
D: Deserialize<'de>,
[src]
D: Deserialize<'de>,
Gets information from a public endpoint of the node.
fn get_private<D>(&self, kind: ApiKind, endpoint: &str) -> D where
D: Deserialize<'de>,
[src]
D: Deserialize<'de>,
Gets information from a private endpoint of the node.
fn get_err<D>(&self, kind: ApiKind, endpoint: &str) -> D where
D: Deserialize<'de>,
[src]
D: Deserialize<'de>,
Gets an error from a public endpoint of the node.
fn post<T, D>(&self, kind: ApiKind, endpoint: &str, transaction: &T) -> D where
T: Serialize,
D: Deserialize<'de>,
[src]
T: Serialize,
D: Deserialize<'de>,
Posts a transaction to the service using the public API. The returned value is the result
of synchronous transaction processing, which includes running the API shim
and Transaction.verify()
. Transaction.execute()
is not run until the transaction
gets to a block via one of create_block*()
methods.
fn post_private<T, D>(
&self,
kind: ApiKind,
endpoint: &str,
transaction: &T
) -> D where
T: Serialize,
D: Deserialize<'de>,
[src]
&self,
kind: ApiKind,
endpoint: &str,
transaction: &T
) -> D where
T: Serialize,
D: Deserialize<'de>,
Posts a transaction to the service using the private API. The returned value is the result
of synchronous transaction processing, which includes running the API shim
and Transaction.verify()
. Transaction.execute()
is not run until the transaction
gets to a block via one of create_block*()
methods.