public void InvalidFormatCdArg6() { var path = new SgtPath("/"); var ex = Assert.Throws <ArgumentException>(() => path.Cd("abc")); Assert.That(ex.Message == SgtPath.InvalidArgumentFormatMessage, () => ex.Message); }
public void InvalidNestingCdArg() { var path = new SgtPath("/"); var ex = Assert.Throws <ArgumentException>(() => path.Cd("..")); Assert.That(ex.Message == SgtPath.InvalidArgumentNestingMessage, () => ex.Message); }
public void CdToAbs3() { var path = new SgtPath("/abc/xyz"); Assert.AreEqual(path.Cd("/abcf/xyzf"), "/abcf/xyzf"); }
public void CdToAbs2() { var path = new SgtPath("/"); Assert.AreEqual(path.Cd("/aBc/xyz"), "/aBc/xyz"); }
public void CdDownTo1From1() { var path = new SgtPath("/abc"); Assert.AreEqual(path.Cd("./xyz"), "/abc/xyz"); }
public void CdDownTo0From0() { var path = new SgtPath("/"); Assert.AreEqual(path.Cd("."), "/"); }
public void CdUpTo2AndDown() { var path = new SgtPath("/abc/def/hgj"); Assert.AreEqual(path.Cd("../../wxy"), "/abc/wxy"); }
public void CdUpTo2() { var path = new SgtPath("/abc/def/hgj"); Assert.AreEqual(path.Cd("../.."), "/abc"); }
public void CdUpToRootL2DownF() { var path = new SgtPath("/abc/def"); Assert.AreEqual(path.Cd("../../def"), "/def"); }
public void CdUpToRootL1() { var path = new SgtPath("/abc"); Assert.AreEqual(path.Cd(".."), "/"); }