diff --git a/src/Avalara.SDK.Test/Api/EInvoicingTests.cs b/src/Avalara.SDK.Test/Api/EInvoicingTests.cs index 1ee9b23..5fb0b7e 100644 --- a/src/Avalara.SDK.Test/Api/EInvoicingTests.cs +++ b/src/Avalara.SDK.Test/Api/EInvoicingTests.cs @@ -31,7 +31,7 @@ public class EInvoicingTests : IDisposable public EInvoicingTests() { var root = Directory.GetCurrentDirectory(); - var basePath = root.Split("\\src\\")[0]; + var basePath = root.Split(new string[] { "\\src\\" }, StringSplitOptions.None)[0]; var dotenv = Path.Combine(basePath, ".env"); DotEnv.Load(dotenv); Configuration configuration = new Configuration diff --git a/src/Avalara.SDK.Test/Auth/OAuthHelperTests.cs b/src/Avalara.SDK.Test/Auth/OAuthHelperTests.cs index a05bd48..d73ea11 100644 --- a/src/Avalara.SDK.Test/Auth/OAuthHelperTests.cs +++ b/src/Avalara.SDK.Test/Auth/OAuthHelperTests.cs @@ -33,14 +33,13 @@ public class OAuthHelperTests : IDisposable public OAuthHelperTests() { var root = Directory.GetCurrentDirectory(); - var basePath = root.Split("\\src\\")[0]; + var basePath = root.Split(new string[] { "\\src\\" }, StringSplitOptions.None)[0]; var dotenv = Path.Combine(basePath, ".env"); - var clientId = !String.IsNullOrEmpty(Environment.GetEnvironmentVariable("CLIENT_ID")) ? Environment.GetEnvironmentVariable("CLIENT_ID") : "sdkOnSbxWebClient"; DotEnv.Load(dotenv); configuration = new Configuration() { Environment = AvalaraEnvironment.Sandbox, - ClientID = clientId, + ClientID = Environment.GetEnvironmentVariable("CLIENT_ID"), AppName = "Test", AppVersion = "1.0", MachineName = "LocalBox"