mirror of
https://github.com/roflmuffin/CounterStrikeSharp.git
synced 2025-12-08 08:56:34 -08:00
15 lines
449 B
C#
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);
|
|
}
|
|
}
|