借助网络配置,控制Modbus工具的日志显示,避免卡死界面
智能大石头 authored at 2021-12-11 22:09:19
625.00 B
XCoder
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));
        });
    }
}