Struct chain_impl_mockchain::testing::gen::TestGen
source · pub struct TestGen;
Expand description
TestGen is a clone of abritrary architecture. There is a need to generate random struct, which would be used just once (quickcheck run test method multiple times thus generating time-consuming test case). This is needed for functional test approach rather than quickcheck approach
Implementations§
source§impl TestGen
impl TestGen
pub fn hash() -> Hash
pub fn rand() -> ChaCha20Rng
pub fn bytes() -> [u8; 32]
pub fn identifier() -> Identifier
pub fn public_key() -> PublicKey<Ed25519>
pub fn parent_id() -> HeaderId
pub fn leader_pair() -> LeaderPair
pub fn secret_key() -> SecretKey<Ed25519>
pub fn secret_keys() -> impl Iterator<Item = SecretKey<Ed25519>>
pub fn leaders_pairs() -> impl Iterator<Item = LeaderPair>
pub fn settings(leaders: Vec<LeaderPair>) -> Settings
pub fn vrf_proof(stake_pool: &StakePool) -> VrfProof
pub fn stake_pool() -> StakePool
pub fn chain_length() -> ChainLength
pub fn genesis_praos_header() -> Header
pub fn bft_header() -> Header
pub fn ledger() -> Ledger
pub fn static_parameters() -> LedgerStaticParameters
pub fn time_era() -> TimeEra
pub fn token_id() -> TokenIdentifier
pub fn token_name() -> TokenName
pub fn mint_token_for_wallet(id: Identifier) -> MintToken
Auto Trait Implementations§
impl RefUnwindSafe for TestGen
impl Send for TestGen
impl Sync for TestGen
impl Unpin for TestGen
impl UnwindSafe for TestGen
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more