public void BeforeScenario()
        {
            var config = _objectContainer.Resolve <LocalConfiguration>();

            AccountsApiMessageHandler accountsApiMessageHandlers = new AccountsApiMessageHandler(config.AccountsApiBaseUrl);

            AccountsApi = new AccountsApi(accountsApiMessageHandlers);

            ProviderEventsApiMessageHandler providerApiMessageHandlers = new ProviderEventsApiMessageHandler(config.PaymentsApiBaseUrl);

            ProviderEventsApi = new ProviderEventsApi(providerApiMessageHandlers);

            CommitmentsApiMessageHandler commitmentsApiMessageHandlers = new CommitmentsApiMessageHandler(config.CommitmentsApiBaseUrl);

            CommitmentsApi = new CommitmentsApi(commitmentsApiMessageHandlers);

            EventsApiMessageHandler eventsApiMessageHandlers = new EventsApiMessageHandler(config.EventsApiBaseUrl);

            EventsApiSubstitute = new EventsApi(eventsApiMessageHandlers);

            TokenServiceApiMessageHandler tokenApiMessageHandlers = new TokenServiceApiMessageHandler(config.TokenServiceApiBaseUrl);

            TokenApiSubstitute = new TokenServiceApi(tokenApiMessageHandlers);

            HmrcApiMessageHandler hmrcApiMessageHandlers = new HmrcApiMessageHandler(config.HmrcApiBaseUrl);

            HmrcApi = new HmrcApi(hmrcApiMessageHandlers);

            _objectContainer.RegisterInstanceAs(accountsApiMessageHandlers);
            _objectContainer.RegisterInstanceAs(providerApiMessageHandlers);
            _objectContainer.RegisterInstanceAs(commitmentsApiMessageHandlers);
            _objectContainer.RegisterInstanceAs(hmrcApiMessageHandlers);
            _objectContainer.RegisterInstanceAs(eventsApiMessageHandlers);
            _objectContainer.RegisterInstanceAs(tokenApiMessageHandlers);
        }
 public void SetUp()
 {
     baseAddress        = "http://localhost:9007/";
     apiMessageHandlers = new TokenServiceApiMessageHandler(baseAddress);
     webApi             = new TokenServiceApi(apiMessageHandlers);
 }