public void When_UsingPointToChildWithValidArguments(string input, string childName, string expectedOutput) { PathRef pathRef = new PathRef(input); Assert.That(() => { pathRef.PointToChild(childName); }, Throws.Nothing); Assert.That(pathRef.ToString(), Is.EqualTo(expectedOutput)); }
public void Navigation() { PathRef pathRef = new PathRef("DirA/DirB"); pathRef.PointToParent(); Assert.That(pathRef.PosixPath, Is.EqualTo(@"DirA")); pathRef.PointToChild("DirC"); Assert.That(pathRef.PosixPath, Is.EqualTo(@"DirA/DirC")); }