forked from SharpMap/SharpMap
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestUtility.cs
More file actions
23 lines (21 loc) · 745 Bytes
/
TestUtility.cs
File metadata and controls
23 lines (21 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
using System.IO;
using NUnit.Framework;
namespace UnitTests
{
/// <summary>
/// Utility class for unit test
/// </summary>
internal static class TestUtility
{
private const string TestFileFolder = "TestData";
/// <summary>
/// Function to get an absolute file path to a file named <paramref name="testFilename"/>.
/// </summary>
/// <param name="testFilename">The name of the test-file</param>
/// <returns>The absolute path to <paramref name="testFilename"/>.</returns>
public static string GetPathToTestFile(string testFilename)
{
return Path.Combine(TestContext.CurrentContext.TestDirectory, TestFileFolder, testFilename);
}
}
}