createAPIRootStarter<A extends APIRoot> method

APIRootStarter<A> createAPIRootStarter<A extends APIRoot>(
  1. A apiRootInstantiator(
    1. APIConfig? apiConfig
    )
)

Creates an APIRootStarter using this APITestConfig as pre-initialization and stopper.

Implementation

APIRootStarter<A> createAPIRootStarter<A extends APIRoot>(
    A Function(APIConfig? apiConfig) apiRootInstantiator) {
  return APIRootStarter.fromInstantiator(
    apiRootInstantiator,
    apiConfig: () => APIConfig(apiConfigMap),
    preInitializer: () => start(), // ignore: discarded_futures
    stopper: () => stop(), // ignore: discarded_futures
  );
}