forked from icsharpcode/CodeConverter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTestConstants.cs
More file actions
26 lines (23 loc) · 770 Bytes
/
TestConstants.cs
File metadata and controls
26 lines (23 loc) · 770 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
using System;
using System.IO;
using System.Reflection;
namespace ICSharpCode.CodeConverter.Tests;
public static class TestConstants
{
/// <summary>
/// To recharacterize:
/// Set to true
/// Run all tests
/// Inspect changes in git
/// Set to false
/// Commit
/// </summary>
public static bool RecharacterizeByWritingExpectedOverActual => false;
public static string GetTestDataDirectory()
{
var assembly = Assembly.GetExecutingAssembly();
var solutionDir = new FileInfo(new Uri(assembly.Location).LocalPath).Directory?.Parent?.Parent?.Parent ??
throw new InvalidOperationException(assembly.Location);
return Path.Combine(solutionDir.FullName, "TestData");
}
}