-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathOverrideInputFileDirPathTests.cs
36 lines (28 loc) · 1.04 KB
/
OverrideInputFileDirPathTests.cs
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
27
28
29
30
31
32
33
34
35
36
using Xunit;
namespace AoCHelper.Test;
[Collection("Sequential")]
public class OverrideInputFileDirPathTests
{
private abstract class BaseProblemFixture : BaseProblem
{
protected override string InputFileExtension => nameof(OverrideInputFileDirPathTests);
public override ValueTask<string> Solve_1() => Solve();
public override ValueTask<string> Solve_2() => Solve();
private ValueTask<string> Solve()
{
if (!File.Exists(InputFilePath))
{
throw new FileNotFoundException(InputFilePath);
}
return new(string.Empty);
}
}
private class Problem33 : BaseProblemFixture { protected override string InputFileDirPath { get; } = "AlternativeInputs"; }
private class Problem_33 : BaseProblemFixture { protected override string InputFileDirPath { get; } = "AlternativeInputs"; }
[Fact]
public async Task OverrideInputFilePathDir()
{
await Solver.Solve<Problem33>();
await Solver.Solve<Problem_33>();
}
}