#![cfg(any(all(feature = "try-runtime", test), doc))]
use crate::*;
use frame_support::{derive_impl, weights::constants::ParityDbWeight};
use crate as pallet_example_storage_migration;
type Block = frame_system::mocking::MockBlock<MockRuntime>;
frame_support::construct_runtime!(
pub struct MockRuntime {
System: frame_system::{Pallet, Call, Config<T>, Storage, Event<T>},
Balances: pallet_balances::{Pallet, Call, Storage, Config<T>, Event<T>},
Example: pallet_example_storage_migration::{Pallet, Call, Storage},
}
);
#[derive_impl(frame_system::config_preludes::TestDefaultConfig)]
impl frame_system::Config for MockRuntime {
type Block = Block;
type AccountData = pallet_balances::AccountData<u64>;
type DbWeight = ParityDbWeight;
}
#[derive_impl(pallet_balances::config_preludes::TestDefaultConfig)]
impl pallet_balances::Config for MockRuntime {
type AccountStore = System;
}
impl Config for MockRuntime {}
pub fn new_test_ext() -> sp_io::TestExternalities {
use sp_runtime::BuildStorage;
let t = RuntimeGenesisConfig { system: Default::default(), balances: Default::default() }
.build_storage()
.unwrap();
t.into()
}