2022-06-07 19:50:34 +08:00
|
|
|
using System;
|
2021-11-13 02:01:03 +08:00
|
|
|
using System.IO;
|
2022-06-07 19:50:34 +08:00
|
|
|
using System.Reflection;
|
2021-11-02 21:46:44 +08:00
|
|
|
using System.Runtime.CompilerServices;
|
|
|
|
using DiffEngine;
|
|
|
|
using VerifyTests;
|
2023-01-14 23:00:40 +08:00
|
|
|
using VerifyXunit;
|
2021-11-02 21:46:44 +08:00
|
|
|
|
2021-11-13 02:01:03 +08:00
|
|
|
namespace BililiveRecorder.Flv.Tests
|
2021-11-02 21:46:44 +08:00
|
|
|
{
|
|
|
|
public static class VerifyConfig
|
|
|
|
{
|
|
|
|
[ModuleInitializer]
|
|
|
|
public static void Init()
|
|
|
|
{
|
2023-01-14 23:00:40 +08:00
|
|
|
Verifier.DerivePathInfo((string sourceFile, string projectDirectory, Type type, MethodInfo method) =>
|
2022-06-07 19:50:34 +08:00
|
|
|
{
|
2024-11-22 21:55:20 +08:00
|
|
|
if (type != typeof(TestData))
|
2022-06-07 19:50:34 +08:00
|
|
|
projectDirectory = Path.Combine(projectDirectory, "..", "data", "flv");
|
|
|
|
|
|
|
|
return Expectations.Initialize(sourceFile, projectDirectory, type, method);
|
|
|
|
});
|
2022-06-07 22:41:09 +08:00
|
|
|
VerifierSettings.IgnoreMembersWithType<Stream>();
|
2022-05-17 15:14:45 +08:00
|
|
|
DiffRunner.Disabled = false;
|
|
|
|
DiffTools.UseOrder(DiffTool.VisualStudioCode, DiffTool.Rider, DiffTool.WinMerge, DiffTool.VisualStudio);
|
2021-11-02 21:46:44 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|