This commit is contained in:
2026-02-24 08:51:11 -08:00
parent 13b3aed088
commit 17c647b4cd
19 changed files with 209 additions and 196 deletions

22
util.cs
View File

@@ -28,8 +28,8 @@ namespace raven_integration
public static class Util
{
//#######################################################################################################
//public static string API_BASE_URL = "http://localhost:7575/api/v8/";
public static string API_BASE_URL = "https://devtest.ayanova.com/api/v8.0/";
public static string API_BASE_URL = "http://localhost:7575/api/v8/";
//public static string API_BASE_URL = "https://devtest.onayanova.com/api/v8.0/";
public static string TEST_DATA_FOLDER = @"..\..\..\testdata\";
//#######################################################################################################
@@ -107,16 +107,20 @@ namespace raven_integration
static bool bInitialized = false;
static volatile bool bInitialized = false;
private static readonly object _initLock = new object();
private static void init()
{
if (bInitialized) return;
if (!System.IO.Directory.Exists(TEST_DATA_FOLDER))
throw new ArgumentOutOfRangeException($"Test data folder {TEST_DATA_FOLDER} not found, current folder is {System.AppDomain.CurrentDomain.BaseDirectory}");
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
bInitialized = true;
lock (_initLock)
{
if (bInitialized) return;
if (!System.IO.Directory.Exists(TEST_DATA_FOLDER))
throw new ArgumentOutOfRangeException($"Test data folder {TEST_DATA_FOLDER} not found, current folder is {System.AppDomain.CurrentDomain.BaseDirectory}");
client.DefaultRequestHeaders.Accept.Clear();
client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
bInitialized = true;
}
}
public static string CleanApiRoute(string route)