resolved SPRNET-533

This commit is contained in:
eeichinger
2008-11-05 22:12:22 +00:00
parent 954a457448
commit 3bc840c863

View File

@@ -40,6 +40,14 @@ namespace Spring.Core.IO
return new FileSystemResource(resourceName);
}
[Test]
public void LeadingProtocolIsNotTreatedRelative()
{
FileSystemResource res = new FileSystemResource(@"file://\\server\share\samples\artfair\");
FileSystemResource res2 = (FileSystemResource) res.CreateRelative(@"file://./index.html");
Assert.AreEqual(new Uri(Path.Combine(Environment.CurrentDirectory, "index.html")).AbsolutePath, res2.Uri.AbsolutePath);
}
[Test]
[ExpectedException(typeof (UriFormatException))]
public void RelativeUncResourceTooManyBackLevels()