Struct exonum_testkit::TestKitBuilder
[−]
[src]
pub struct TestKitBuilder { /* fields omitted */ }
Builder for TestKit
.
Example
let mut testkit = TestKitBuilder::validator() .with_service(MyService) .with_validators(4) .create(); testkit.create_block(); // Other test code
Methods
impl TestKitBuilder
[src]
fn validator() -> Self
[src]
Creates testkit for the validator node.
fn auditor() -> Self
[src]
Creates testkit for the auditor node.
fn with_validators(self, validators_count: u16) -> Self
[src]
Sets the number of validator nodes in the test network.
fn with_service<S>(self, service: S) -> Self where
S: Into<Box<Service>>,
[src]
S: Into<Box<Service>>,
Adds a service to the testkit.
fn create(self) -> TestKit
[src]
Creates the testkit.