public void WhenPathIsRelative_ShouldReturnRelativeCurrentPath( ) { var fixture = new Fixture( ); var path = fixture.Create("path-"); var result = LinuxPath.GetPathRoot(path); Assert.Equal("./", result); }
public void WhenPathIsRooted_ShouldReturnRootPath() { var fixture = new Fixture( ); var path = fixture.Create("/path-"); var result = LinuxPath.GetPathRoot(path); Assert.Equal("/", result); }
public void GetPathRootTest() { String result = LinuxPath.GetPathRoot("/system/busybox"); Assert.AreEqual <string>("/", result); result = LinuxPath.GetPathRoot("/system/xbin/"); Assert.AreEqual <string>("/", result); result = LinuxPath.GetPathRoot("/system/xbin/file.ext"); Assert.AreEqual <string>("/", result); }
public void WhenPathEmpty_ShouldReturnRelativeCurrentPath( ) { var result = LinuxPath.GetPathRoot(string.Empty); Assert.Equal("./", result); }
public void WhenPathIsNull_ShouldReturnNull() { var result = LinuxPath.GetPathRoot(null); Assert.Null(result); }