Replace hardcoded paths with environment variables
This commit is contained in:
@@ -5,8 +5,9 @@ namespace AoC_2025.Tests;
|
||||
public class Day01Test
|
||||
{
|
||||
private readonly IPuzzleSolver<int> _sut;
|
||||
private const string TestInputPath = @"C:\Users\p01004051\Documents\AoC-PuzzleInputs\2025\Test\day01.txt";
|
||||
private const string ProdInputPath = @"C:\Users\p01004051\Documents\AoC-PuzzleInputs\2025\Prod\day01.txt";
|
||||
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
private readonly string TestInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Test\day01.txt";
|
||||
private readonly string ProdInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Prod\day01.txt";
|
||||
|
||||
public Day01Test()
|
||||
{
|
||||
|
||||
@@ -5,8 +5,9 @@ namespace AoC_2025.Tests;
|
||||
public class Day02Test
|
||||
{
|
||||
private readonly IPuzzleSolver<long> _sut;
|
||||
private const string TestInputPath = @"C:\Users\p01004051\Documents\AoC-PuzzleInputs\2025\Test\day02.txt";
|
||||
private const string ProdInputPath = @"C:\Users\p01004051\Documents\AoC-PuzzleInputs\2025\Prod\day02.txt";
|
||||
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
private readonly string TestInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Test\day02.txt";
|
||||
private readonly string ProdInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Prod\day02.txt";
|
||||
|
||||
public Day02Test()
|
||||
{
|
||||
|
||||
@@ -5,8 +5,9 @@ namespace AoC_2025.Tests;
|
||||
public class Day03Test
|
||||
{
|
||||
private readonly IPuzzleSolver<long> _sut;
|
||||
private const string TestInputPath = @"C:\Users\p01004051\Documents\AoC-PuzzleInputs\2025\Test\day03.txt";
|
||||
private const string ProdInputPath = @"C:\Users\p01004051\Documents\AoC-PuzzleInputs\2025\Prod\day03.txt";
|
||||
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
private readonly string TestInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Test\day03.txt";
|
||||
private readonly string ProdInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Prod\day03.txt";
|
||||
|
||||
public Day03Test()
|
||||
{
|
||||
|
||||
@@ -5,8 +5,9 @@ namespace AoC_2025.Tests;
|
||||
public class Day04Test
|
||||
{
|
||||
private readonly IPuzzleSolver<long> _sut;
|
||||
private const string TestInputPath = @"C:\Users\p01004051\Documents\AoC-PuzzleInputs\2025\Test\day04.txt";
|
||||
private const string ProdInputPath = @"C:\Users\p01004051\Documents\AoC-PuzzleInputs\2025\Prod\day04.txt";
|
||||
private static readonly string rootPath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
|
||||
private readonly string TestInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Test\day04.txt";
|
||||
private readonly string ProdInputPath = @$"{rootPath}\AoC-PuzzleInputs\2025\Prod\day04.txt";
|
||||
|
||||
public Day04Test()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user