#![cfg(any(with_testing, with_wasm_runtime))]
#[cfg(with_integration_testing)]
mod block;
#[cfg(with_integration_testing)]
mod chain;
mod mock_stubs;
#[cfg(with_integration_testing)]
mod validator;
#[cfg(with_integration_testing)]
pub use {
linera_chain::{
data_types::{Medium, MessageAction},
test::HttpServer,
ChainError, ChainExecutionContext,
},
linera_core::worker::WorkerError,
linera_execution::{system::Recipient, ExecutionError, QueryOutcome, WasmExecutionError},
};
#[cfg(with_testing)]
pub use self::mock_stubs::*;
#[cfg(with_integration_testing)]
pub use self::{
block::BlockBuilder,
chain::{ActiveChain, TryGraphQLMutationError, TryGraphQLQueryError, TryQueryError},
validator::TestValidator,
};
use crate::{Contract, ContractRuntime, Service, ServiceRuntime};
pub fn test_contract_runtime<Application: Contract>() -> ContractRuntime<Application> {
ContractRuntime::new()
}
pub fn test_service_runtime<Application: Service>() -> ServiceRuntime<Application> {
ServiceRuntime::new()
}