Trait network::testutils::test_framework::TestFramework [−][src]
pub trait TestFramework<Node: ApplicationNode + Sync> {
fn new(nodes: HashMap<NodeId, Node>) -> Self;
fn build_node(
node_id: NodeId,
config: NodeConfig,
peer_network_ids: &[PeerNetworkId]
) -> Node;
fn take_node(&mut self, node_id: NodeId) -> Node;
}Expand description
A trait describing a test framework for a specific application
This is essentially an abstract implementation, to get around how rust handles traits there are functions to get required variables in the implementation.
Required methods
Constructor for the TestFramework
fn build_node(
node_id: NodeId,
config: NodeConfig,
peer_network_ids: &[PeerNetworkId]
) -> Node
fn build_node(
node_id: NodeId,
config: NodeConfig,
peer_network_ids: &[PeerNetworkId]
) -> Node
A constructor for Node specific to the application