public sbaCSharpClientTest() { #region read configuration IConfigurationRoot configurationRoot = new ConfigurationBuilder() .SetBasePath(Directory.GetCurrentDirectory()) .AddJsonFile("appsettings.json") .Build(); BaseUri = configurationRoot.GetSection("baseUri").Value; ApiToken = configurationRoot.GetSection("api-token").Value; VendorKey = configurationRoot.GetSection("vendor-key").Value; pppLoanDocumentTypes = configurationRoot.GetSection("loan-forgiveness-document_types-URL").Value; pppLoanForgivenessRequests = configurationRoot.GetSection("loan-forgiveness-requests-URL").Value; pppLoanDocuments = configurationRoot.GetSection("loan-documents-URL").Value; pppLoanForgivenessMessageReply = configurationRoot.GetSection("loan-Forgiveness-Message-Reply-URL").Value; pppLoanForgivenessMessages = configurationRoot.GetSection("loan-Forgiveness-Message-URL").Value; ppp3LoanOrigination = configurationRoot.GetSection("ppp3-Loan-Origination_URL").Value; #endregion #region Initialize Controllers sbaLoanDocuments = new SbaLoanDocumentsController( new SbaLoanDocumentService(new SbaRestApiClient(BaseUri, ApiToken, VendorKey))); sbaLoanForgiveness = new SbaLoanForgivenessController( new SbaLoanForgivenessService(new SbaRestApiClient(BaseUri, ApiToken, VendorKey))); sbaLoanForgivenessMessageController = new SbaLoanForgivenessMessageController( new SbaLoanForgivenessMessageService(new SbaRestApiClient(BaseUri, ApiToken, VendorKey))); ppp3LoanOriginationController = new PPP3LoanOriginationController( new PPP3LoanOriginationService(new SbaRestApiClient(BaseUri, ApiToken, VendorKey))); #endregion }