经过两天修正,足够稳定,发布0204,希望作为LTS版本
大石头 编写于 2020-02-04 22:44:36
X
using System;
using System.Collections.Generic;
using System.IO;
using System.Text;
using Xunit;

namespace XUnitTest.IO
{
    public class PathHelperTests
    {
        [Fact]
        public void BasePath()
        {
            var bpath = PathHelper.BasePath;

            Assert.NotEmpty(bpath);
            Assert.Equal(bpath, AppDomain.CurrentDomain.BaseDirectory);

            Assert.Equal("config".GetFullPath(), "config".GetBasePath());

            // 改变
            PathHelper.BasePath = "../xx";
            Assert.Equal("../xx/config".GetFullPath(), "config".GetBasePath());

            PathHelper.BasePath = bpath;
        }
    }
}