Beispiel #1
0
 public void TestGet_absolute()
 {
     try
     {
         RelativeUnixPath.Get("/absolute");
         Assert.Fail();
     }
     catch (ArgumentException ex)
     {
         Assert.AreEqual("Path starts with forward slash (/): /absolute", ex.Message);
     }
 }
Beispiel #2
0
 public void TestGet()
 {
     CollectionAssert.AreEqual(
         ImmutableArray.Create("some", "relative", "path"),
         RelativeUnixPath.Get("some/relative///path").GetRelativePathComponents());
 }
Beispiel #3
0
 public RelativeUnixPath GetFileName()
 {
     return(RelativeUnixPath.Get(Path.GetFileName(path)));
 }