public void FullPathTest() { Assert.IsFalse(IS.FullPath(null)); Assert.IsFalse(IS.FullPath(string.Empty)); Assert.IsFalse(IS.FullPath(" ")); Assert.IsFalse(IS.FullPath(@"D:\temp\")); Assert.IsFalse(IS.FullPath(@"D:\temp\sd")); //разрешать такое или нет решать вам))) //Assert.IsFalse(IS.FullPath(@"D:\temp\sd\..\me.txt")); Assert.IsFalse(IS.FullPath(@"UDP:\temp\me.txt")); Assert.IsFalse(IS.FullPath(@"Com:\temp\me.txt")); Assert.IsFalse(IS.FullPath(@"C:\temp!\me.txt")); Assert.IsFalse(IS.FullPath(@"D:\temp\aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc\ddddddddddddddddddddddddddddddddddddddddddddd\me.txt")); Assert.IsTrue(IS.FullPath(@"D:\temp\e.dat")); Assert.IsTrue(IS.FullPath(@"D:\temp\edd.dat", ".dat")); Assert.IsFalse(IS.FullPath(@"D:\temp\edd.dt", ".dat")); }