pub fn with_registered_account() -> Self {
        let mut context = new_context(TEST_ACCOUNT_ID);
        testing_env!(context.clone());

        let mut contract = Contract::new(
            to_valid_account_id(TEST_STAKING_POOL_ID),
            to_valid_account_id(TEST_OWNER_ID),
            to_valid_account_id(TEST_OPERATOR_ID),
        );

        context.attached_deposit = YOCTO;
        testing_env!(context.clone());
        contract.register_account();
        context.account_balance += contract.account_storage_fee().value();

        context.attached_deposit = 0;
        context.storage_usage = contract.contract_initial_storage_usage.value();
        testing_env!(context.clone());

        Self {
            contract,
            account_id: TEST_ACCOUNT_ID,
            context,
        }
    }
/// uses [`TEST_ACCOUNT_ID`] as the predecessor account ID and registers the account with the contract
uses [`TEST_ACCOUNT_ID`] as the predecessor account ID and registers the account with the contract
uses [ ` TEST_ACCOUNT_ID ` ] as the predecessor account ID and registers the account with the contract
pub fn with_registered_account() -> Self {
        let mut context = new_context(TEST_ACCOUNT_ID);
        testing_env!(context.clone());
        let mut contract = Contract::new(
            to_valid_account_id(TEST_STAKING_POOL_ID),
            to_valid_account_id(TEST_OWNER_ID),
            to_valid_account_id(TEST_OPERATOR_ID),
        );
        context.attached_deposit = YOCTO;
        testing_env!(context.clone());
        contract.register_account();
        context.account_balance += contract.account_storage_fee().value();
        context.attached_deposit = 0;
        context.storage_usage = contract.contract_initial_storage_usage.value();
        testing_env!(context.clone());
        Self {
            contract,
            account_id: TEST_ACCOUNT_ID,
            context,
        }
    }
pub fn with_registered_account ( ) -> Self { let mut context = new_context ( TEST_ACCOUNT_ID ) ; testing_env ! ( context clone ( ) ) ; let mut contract = Contract :: new ( to_valid_account_id ( TEST_STAKING_POOL_ID ) , to_valid_account_id ( TEST_OWNER_ID ) , to_valid_account_id ( TEST_OPERATOR_ID ) , ) ; context . attached_deposit = YOCTO ; testing_env ! ( context clone ( ) ) ; contract . register_account ( ) ; context . account_balance += contract . account_storage_fee ( ) . value ( ) ; context . attached_deposit = 0 ; context . storage_usage = contract . contract_initial_storage_usage . value ( ) ; testing_env ! ( context clone ( ) ) ; Self { contract , account_id : TEST_ACCOUNT_ID , context , } }
uses [`TEST_ACCOUNT_ID`] as the predecessor account ID and registers the account with the contract
uses [ ` TEST_ACCOUNT_ID ` ] as the predecessor account ID and registers the account with the contract