1#![cfg(any(with_testing, with_wasm_runtime))]
12
13#[cfg(with_integration_testing)]
14mod block;
15#[cfg(with_integration_testing)]
16mod chain;
17mod mock_stubs;
18#[cfg(with_integration_testing)]
19mod validator;
20
21#[cfg(with_integration_testing)]
22pub use {
23 linera_chain::{
24 data_types::MessageAction, test::HttpServer, ChainError, ChainExecutionContext,
25 },
26 linera_core::worker::WorkerError,
27 linera_execution::{system::Recipient, ExecutionError, QueryOutcome, WasmExecutionError},
28};
29
30#[cfg(with_testing)]
31pub use self::mock_stubs::*;
32#[cfg(with_integration_testing)]
33pub use self::{
34 block::BlockBuilder,
35 chain::{ActiveChain, TryGraphQLMutationError, TryGraphQLQueryError, TryQueryError},
36 validator::TestValidator,
37};
38use crate::{Contract, ContractRuntime, Service, ServiceRuntime};
39
40pub fn test_contract_runtime<Application: Contract>() -> ContractRuntime<Application> {
42 ContractRuntime::new()
43}
44
45pub fn test_service_runtime<Application: Service>() -> ServiceRuntime<Application> {
47 ServiceRuntime::new()
48}