mirror of
https://github.com/BililiveRecorder/BililiveRecorder.git
synced 2024-12-27 12:35:35 +08:00
30 lines
894 B
C#
30 lines
894 B
C#
|
using System.IO;
|
||
|
using System.Linq;
|
||
|
using System.Threading.Tasks;
|
||
|
using VerifyTests;
|
||
|
using VerifyXunit;
|
||
|
using Xunit;
|
||
|
|
||
|
namespace BililiveRecorder.Flv.Tests
|
||
|
{
|
||
|
[UsesVerify]
|
||
|
public class TestData
|
||
|
{
|
||
|
[Fact]
|
||
|
public Task MeetsExpectations()
|
||
|
{
|
||
|
var baseDirectory = new DirectoryInfo(Path.Combine(AttributeReader.GetProjectDirectory(), "../data/flv/TestData"));
|
||
|
var allFiles = baseDirectory.EnumerateFiles("*", new EnumerationOptions()
|
||
|
{
|
||
|
RecurseSubdirectories = true
|
||
|
});
|
||
|
|
||
|
var relativePaths = allFiles.Select(x => Path.GetRelativePath(baseDirectory.FullName, x.FullName))
|
||
|
.Select(x => x.Replace('\\', '/'))
|
||
|
.OrderBy(x => x);
|
||
|
|
||
|
return Verifier.Verify(string.Join('\n', relativePaths));
|
||
|
}
|
||
|
}
|
||
|
}
|