static void Main(string[] args) { string baseAddress = DependencyInjector.ApplicationContainer().GetInstance <IApplicationConfig>().BaseAddress; WebApp.Start <WebApiConfiguration>(url: baseAddress); Console.ReadLine(); }
public void CurrencyLayerApiProviderShouldReturnSuccessOnHistoricalRateEndpoint() { //ARRANGE var currencyLayerEndpoints = DependencyInjector.ApplicationContainer().GetInstance <ICurrencyLayerEndpoints>(); var currencyLayerConfig = DependencyInjector.ApplicationContainer().GetInstance <ICurrencyLayerConfig>(); string currency = "USD"; DateTime inputDateTime = DateTime.UtcNow; //ACT var controller = new CurrencyLayerApiProvider(currencyLayerEndpoints, currencyLayerConfig); var result = controller.GetHistoricalRatesForGivenCurrency(currency, inputDateTime); //ASSERT Assert.Equal(true, result.Success); }