public void WhenPathDoesNotHaveFile_ShouldReturnFalse( ) { var fixture = new Fixture( ); var path = "/path/to/file/"; var result = LinuxPath.HasExtension(path); Assert.False(result); }
public void HasExtension() { Assert.True(LinuxPath.HasExtension("\\one\\two\\three.txt")); Assert.True(LinuxPath.HasExtension("/one/two/three.txt")); Assert.False(LinuxPath.HasExtension("\\one\\two\\three")); Assert.False(LinuxPath.HasExtension("/one/two/three")); }
public void WhenPathDoesNotHaveExtension_ShouldReturnFalse( ) { var fixture = new Fixture( ); var file = fixture.Create("file-"); var path = "/path/to/file/{0}".With(file); var result = LinuxPath.HasExtension(path); Assert.False(result); }
public void WhenPathHasExtension_ShouldReturnTrue( ) { var fixture = new Fixture( ); var file = fixture.Create("file-"); var path = "/path/to/file/{0}.ext".With(file); var result = LinuxPath.HasExtension(path); Assert.True(result); }
public void HasExtensionTest() { bool result = LinuxPath.HasExtension("/system/busybox"); Assert.AreEqual <bool>(false, result); result = LinuxPath.HasExtension("/system/xbin.foo/"); Assert.AreEqual <bool>(false, result); result = LinuxPath.HasExtension("system/xbin/file.ext"); Assert.AreEqual <bool>(true, result); }
public void WhenPathIsEmpty_ShouldReturnFalse( ) { var result = LinuxPath.HasExtension(string.Empty); Assert.False(result); }
public void WhenPathIsNull_ShouldReturnFalse() { var result = LinuxPath.HasExtension(null); Assert.False(result); }