Files
CounterStrikeSharp/managed/CounterStrikeSharp.API.Tests/TestUtils.cs
2023-12-11 13:24:14 +10:00

15 lines
449 B
C#

using System.Reflection;
namespace CounterStrikeSharp.API.Tests;
public static class TestUtils
{
public static string GetTestPath(string relativePath)
{
var codeBaseUrl = new Uri(Assembly.GetExecutingAssembly().Location);
var codeBasePath = Uri.UnescapeDataString(codeBaseUrl.AbsolutePath);
var dirPath = Path.GetDirectoryName(codeBasePath);
return Path.Combine(dirPath, "Resources", relativePath);
}
}