using System;
using System.ComponentModel;
using System.IO;
using NewLife.XCoder.Tools.Folder;
using Xunit;
namespace XCoder.App.Tests;
/// <summary>文件夹统计的驱动器枚举测试</summary>
public class FolderDriveTests
{
[Fact]
[DisplayName("枚举本机驱动器并返回可定位的根路径")]
public void GetDrives_ReturnsRootedPaths()
{
var drives = FolderDrive.GetDrives();
Assert.NotEmpty(drives);
Assert.All(drives, e =>
{
Assert.False(String.IsNullOrWhiteSpace(e.Root));
Assert.True(Path.IsPathRooted(e.Root));
});
}
}
|