public void Test_FileExtension() { FilePath filePath = new FilePathRelative(@".\File.txt"); Assert.IsTrue(filePath.FileExtension == @".txt"); Assert.IsTrue(filePath.HasExtension(@".txt")); Assert.IsTrue(filePath.HasExtension(@".TxT")); Assert.IsTrue(filePath.HasExtension(@".TXT")); filePath = new FilePathRelative(@".\File"); Assert.IsTrue(filePath.FileExtension == string.Empty); filePath = new FilePathRelative(@".\File."); Assert.IsTrue(filePath.FileExtension == string.Empty); filePath = new FilePathAbsolute(@"C:\dir1\\//dir2\File.txt.Exe"); Assert.IsTrue(filePath.FileExtension == @".Exe"); Assert.IsTrue(filePath.HasExtension(@".exe")); }
public void Test_HasExtensionError3() { FilePath filePath = new FilePathRelative(@".\File."); Assert.IsTrue(filePath.HasExtension(".")); }
public void Test_HasExtensionError1() { FilePath filePath = new FilePathRelative(@".\File"); Assert.IsTrue(filePath.HasExtension(string.Empty)); }
public void Test_HasExtensionError3() { FilePath filePath = new FilePathRelative(@".\File."); Assert.IsTrue(filePath.HasExtension(".")); }
public void Test_HasExtensionError1() { FilePath filePath = new FilePathRelative(@".\File"); Assert.IsTrue(filePath.HasExtension(string.Empty)); }
public void Test_FileExtension() { FilePath filePath = new FilePathRelative(@".\File.txt"); Assert.IsTrue(filePath.FileExtension == @".txt"); Assert.IsTrue(filePath.HasExtension(@".txt")); Assert.IsTrue(filePath.HasExtension(@".TxT")); Assert.IsTrue(filePath.HasExtension(@".TXT")); filePath = new FilePathRelative(@".\File"); Assert.IsTrue(filePath.FileExtension == string.Empty); filePath = new FilePathRelative(@".\File."); Assert.IsTrue(filePath.FileExtension == string.Empty); filePath = new FilePathAbsolute(@"C:\dir1\\//dir2\File.txt.Exe"); Assert.IsTrue(filePath.FileExtension == @".Exe"); Assert.IsTrue(filePath.HasExtension(@".exe")); }